pub struct DirectiveName(/* private fields */);Implementations§
Source§impl DirectiveName
impl DirectiveName
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, ApiPrimitiveError>
pub fn new(value: impl AsRef<str>) -> Result<Self, ApiPrimitiveError>
Creates validated text metadata.
§Errors
Returns ApiPrimitiveError when the value is empty or contains control characters.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the value and returns the stored text.
Trait Implementations§
Source§impl AsRef<str> for DirectiveName
impl AsRef<str> for DirectiveName
Source§impl Clone for DirectiveName
impl Clone for DirectiveName
Source§fn clone(&self) -> DirectiveName
fn clone(&self) -> DirectiveName
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DirectiveName
impl Debug for DirectiveName
Source§impl Display for DirectiveName
impl Display for DirectiveName
Source§impl FromStr for DirectiveName
impl FromStr for DirectiveName
Source§impl Hash for DirectiveName
impl Hash for DirectiveName
Source§impl Ord for DirectiveName
impl Ord for DirectiveName
Source§fn cmp(&self, other: &DirectiveName) -> Ordering
fn cmp(&self, other: &DirectiveName) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DirectiveName
impl PartialEq for DirectiveName
Source§impl PartialOrd for DirectiveName
impl PartialOrd for DirectiveName
Source§impl TryFrom<&str> for DirectiveName
impl TryFrom<&str> for DirectiveName
impl Eq for DirectiveName
impl StructuralPartialEq for DirectiveName
Auto Trait Implementations§
impl Freeze for DirectiveName
impl RefUnwindSafe for DirectiveName
impl Send for DirectiveName
impl Sync for DirectiveName
impl Unpin for DirectiveName
impl UnsafeUnpin for DirectiveName
impl UnwindSafe for DirectiveName
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more