pub struct Identifier<'a>(/* private fields */);Implementations§
Source§impl<'a> Identifier<'a>
impl<'a> Identifier<'a>
pub fn into_inner(self) -> IdentifierInner<'a>
pub const unsafe fn from_inner_unchecked(inner: IdentifierInner<'a>) -> Self
pub fn from_inner(inner: IdentifierInner<'a>) -> Result<Self, IdentifierError>
Sourcepub fn new_with_default(
value: impl Into<Cow<'a, str>>,
default_key: impl Into<Cow<'a, str>>,
) -> Result<Self, IdentifierError>
pub fn new_with_default( value: impl Into<Cow<'a, str>>, default_key: impl Into<Cow<'a, str>>, ) -> Result<Self, IdentifierError>
If value is full identifier then new_fulled function with value argument will be used. If value is not full identifier then new_partial with default_key and value arguments will be used
pub fn new_fulled( full: impl Into<Cow<'a, str>>, ) -> Result<Self, IdentifierError>
pub fn new_partial( key: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>, ) -> Result<Self, IdentifierError>
pub fn get_fulled(&'a self) -> Cow<'a, str>
pub fn get_partial(&'a self) -> (&'a str, &'a str)
pub fn into_fulled(self) -> Cow<'a, str>
pub fn into_partial(self) -> (Cow<'a, str>, Cow<'a, str>)
pub const fn is_fulled(&self) -> bool
pub const fn is_partial(&self) -> bool
Trait Implementations§
Source§impl<'a> Clone for Identifier<'a>
impl<'a> Clone for Identifier<'a>
Source§fn clone(&self) -> Identifier<'a>
fn clone(&self) -> Identifier<'a>
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<'a> Debug for Identifier<'a>
impl<'a> Debug for Identifier<'a>
Source§impl<'de, 'a> Deserialize<'de> for Identifier<'a>
impl<'de, 'a> Deserialize<'de> for Identifier<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Identifier<'_>
impl Display for Identifier<'_>
Source§impl From<Identifier<'_>> for String
impl From<Identifier<'_>> for String
Source§fn from(identifier: Identifier<'_>) -> Self
fn from(identifier: Identifier<'_>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Identifier<'_>
impl PartialEq for Identifier<'_>
Source§impl<'a> Serialize for Identifier<'a>
impl<'a> Serialize for Identifier<'a>
Auto Trait Implementations§
impl<'a> Freeze for Identifier<'a>
impl<'a> RefUnwindSafe for Identifier<'a>
impl<'a> Send for Identifier<'a>
impl<'a> Sync for Identifier<'a>
impl<'a> Unpin for Identifier<'a>
impl<'a> UnwindSafe for Identifier<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more