pub struct VarLenIdString(/* private fields */);Expand description
variable length(up to 26 bytes) of numeric or letter characters
Implementations§
Source§impl VarLenIdString
impl VarLenIdString
Sourcepub fn check(s: &str) -> Result<(), VarLenIdStringDeserializeError>
pub fn check(s: &str) -> Result<(), VarLenIdStringDeserializeError>
Checks whether the string is a valid Id
Sourcepub unsafe fn from_str_unchecked(s: &str) -> Self
pub unsafe fn from_str_unchecked(s: &str) -> Self
Creates a new IdString wihtout checking that
the contents are valid id characters, and the whole string
is of the right length.
§Safety
s should have passed Self::check
Sourcepub unsafe fn from_string_unchecked(s: String) -> Self
pub unsafe fn from_string_unchecked(s: String) -> Self
Creates a new IdString wihtout checking that
the contents are valid id characters, and the whole string
is of the right length.
§Safety
s should have passed Self::check
Trait Implementations§
Source§impl AsRef<str> for VarLenIdString
impl AsRef<str> for VarLenIdString
Source§impl Clone for VarLenIdString
impl Clone for VarLenIdString
Source§fn clone(&self) -> VarLenIdString
fn clone(&self) -> VarLenIdString
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 VarLenIdString
impl Debug for VarLenIdString
Source§impl<'de> Deserialize<'de> for VarLenIdString
impl<'de> Deserialize<'de> for VarLenIdString
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 VarLenIdString
impl Display for VarLenIdString
Source§impl From<CategoryId> for VarLenIdString
impl From<CategoryId> for VarLenIdString
Source§fn from(id: CategoryId) -> Self
fn from(id: CategoryId) -> Self
Converts to this type from the input type.
Source§impl From<VarLenIdString> for CategoryId
impl From<VarLenIdString> for CategoryId
Source§fn from(id: VarLenIdString) -> Self
fn from(id: VarLenIdString) -> Self
Converts to this type from the input type.
Source§impl From<VarLenIdString> for String
impl From<VarLenIdString> for String
Source§fn from(id: VarLenIdString) -> Self
fn from(id: VarLenIdString) -> Self
Converts to this type from the input type.
Source§impl FromStr for VarLenIdString
impl FromStr for VarLenIdString
Source§impl Hash for VarLenIdString
impl Hash for VarLenIdString
Source§impl Ord for VarLenIdString
impl Ord for VarLenIdString
Source§fn cmp(&self, other: &VarLenIdString) -> Ordering
fn cmp(&self, other: &VarLenIdString) -> 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<'a> PartialEq<&'a str> for VarLenIdString
impl<'a> PartialEq<&'a str> for VarLenIdString
Source§impl PartialEq<String> for VarLenIdString
impl PartialEq<String> for VarLenIdString
Source§impl PartialEq<str> for VarLenIdString
impl PartialEq<str> for VarLenIdString
Source§impl PartialEq for VarLenIdString
impl PartialEq for VarLenIdString
Source§impl<'a> PartialOrd<&'a str> for VarLenIdString
impl<'a> PartialOrd<&'a str> for VarLenIdString
Source§impl PartialOrd<String> for VarLenIdString
impl PartialOrd<String> for VarLenIdString
Source§impl PartialOrd<str> for VarLenIdString
impl PartialOrd<str> for VarLenIdString
Source§impl PartialOrd for VarLenIdString
impl PartialOrd for VarLenIdString
Source§impl Serialize for VarLenIdString
impl Serialize for VarLenIdString
Source§impl TryFrom<String> for VarLenIdString
impl TryFrom<String> for VarLenIdString
impl Copy for VarLenIdString
impl Eq for VarLenIdString
impl StructuralPartialEq for VarLenIdString
Auto Trait Implementations§
impl Freeze for VarLenIdString
impl RefUnwindSafe for VarLenIdString
impl Send for VarLenIdString
impl Sync for VarLenIdString
impl Unpin for VarLenIdString
impl UnwindSafe for VarLenIdString
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