pub struct ObjectKey(/* private fields */);Expand description
A validated relative immutable-object key.
Implementations§
Source§impl ObjectKey
impl ObjectKey
Sourcepub fn new(value: impl Into<String>) -> Result<Self, IdentifierError>
pub fn new(value: impl Into<String>) -> Result<Self, IdentifierError>
Constructs a safe relative object key.
Sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consumes this object key.
The allocation can exceed the encoded key length. Memory admissions
retaining this key must use allocated_capacity_bytes instead.
Sourcepub fn allocated_capacity_bytes(&self) -> usize
pub fn allocated_capacity_bytes(&self) -> usize
Owned string allocation capacity, excluding the inline string header.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ObjectKey
impl<'de> Deserialize<'de> for ObjectKey
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 ObjectKey
Source§impl Ord for ObjectKey
impl Ord for ObjectKey
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 ObjectKey
impl PartialOrd for ObjectKey
impl StructuralPartialEq for ObjectKey
Auto Trait Implementations§
impl Freeze for ObjectKey
impl RefUnwindSafe for ObjectKey
impl Send for ObjectKey
impl Sync for ObjectKey
impl Unpin for ObjectKey
impl UnsafeUnpin for ObjectKey
impl UnwindSafe for ObjectKey
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