pub struct AllocatedLen(/* private fields */);Expand description
The byte length of a live allocation.
Rust guarantees no allocation exceeds isize::MAX bytes, so a value read
off a slice or a str carries that bound with it. A declared length read
from a document is minted against the same bound, so every value of this
type carries it however it arrived.
Implementations§
Trait Implementations§
Source§impl Clone for AllocatedLen
impl Clone for AllocatedLen
impl Copy for AllocatedLen
Source§impl Debug for AllocatedLen
impl Debug for AllocatedLen
Source§impl<'de> Deserialize<'de> for AllocatedLen
impl<'de> Deserialize<'de> for AllocatedLen
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 AllocatedLen
Source§impl From<&[u8]> for AllocatedLen
impl From<&[u8]> for AllocatedLen
Source§impl From<&str> for AllocatedLen
impl From<&str> for AllocatedLen
Source§impl From<AllocatedLen> for u64
impl From<AllocatedLen> for u64
Source§fn from(length: AllocatedLen) -> Self
fn from(length: AllocatedLen) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AllocatedLen
impl PartialEq for AllocatedLen
Source§impl Serialize for AllocatedLen
impl Serialize for AllocatedLen
impl StructuralPartialEq for AllocatedLen
Auto Trait Implementations§
impl Freeze for AllocatedLen
impl RefUnwindSafe for AllocatedLen
impl Send for AllocatedLen
impl Sync for AllocatedLen
impl Unpin for AllocatedLen
impl UnsafeUnpin for AllocatedLen
impl UnwindSafe for AllocatedLen
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