pub struct IndexName(/* private fields */);Expand description
A bounded human-facing index name.
Implementations§
Source§impl IndexName
impl IndexName
pub fn new(value: impl Into<String>) -> Result<Self, IdentityError>
pub fn as_str(&self) -> &str
pub fn into_inner(self) -> String
Sourcepub fn to_binary(&self) -> Vec<u8> ⓘ
pub fn to_binary(&self) -> Vec<u8> ⓘ
Encodes the bounded binary form as a big-endian u16 length followed by the exact UTF-8 bytes.
Sourcepub fn from_binary(bytes: &[u8]) -> Result<Self, IdentityError>
pub fn from_binary(bytes: &[u8]) -> Result<Self, IdentityError>
Decodes one exact bounded binary value, refusing trailing bytes.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IndexName
impl<'de> Deserialize<'de> for IndexName
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
impl Eq for IndexName
Source§impl Ord for IndexName
impl Ord for IndexName
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for IndexName
impl PartialOrd for IndexName
impl StructuralPartialEq for IndexName
Auto Trait Implementations§
impl Freeze for IndexName
impl RefUnwindSafe for IndexName
impl Send for IndexName
impl Sync for IndexName
impl Unpin for IndexName
impl UnsafeUnpin for IndexName
impl UnwindSafe for IndexName
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