pub struct IdString(/* private fields */);Expand description
26-bytes of numeric or uppercase letter characters
Implementations§
Source§impl IdString
impl IdString
Sourcepub fn check(s: &str) -> Result<(), IdStringDeserializeError>
pub fn check(s: &str) -> Result<(), IdStringDeserializeError>
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<'de> Deserialize<'de> for IdString
impl<'de> Deserialize<'de> for IdString
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 Ord for IdString
impl Ord for IdString
Source§impl<'a> PartialOrd<&'a str> for IdString
impl<'a> PartialOrd<&'a str> for IdString
Source§impl PartialOrd<String> for IdString
impl PartialOrd<String> for IdString
Source§impl PartialOrd<str> for IdString
impl PartialOrd<str> for IdString
Source§impl PartialOrd for IdString
impl PartialOrd for IdString
impl Copy for IdString
impl Eq for IdString
impl StructuralPartialEq for IdString
Auto Trait Implementations§
impl Freeze for IdString
impl RefUnwindSafe for IdString
impl Send for IdString
impl Sync for IdString
impl Unpin for IdString
impl UnwindSafe for IdString
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