pub enum ValueRef {
Inline(Vec<u8>),
Blob(BlobRef),
}Expand description
Value stored in a leaf by the large-value helper layer.
Variants§
Implementations§
Source§impl ValueRef
impl ValueRef
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Encode this reference as a deterministic leaf value envelope.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
Decode a value reference envelope.
Sourcepub fn from_stored_bytes(bytes: &[u8]) -> Result<Self, Error>
pub fn from_stored_bytes(bytes: &[u8]) -> Result<Self, Error>
Decode a stored value, treating non-envelope bytes as inline values.
Sourcepub fn inline_requires_escape(value: &[u8]) -> bool
pub fn inline_requires_escape(value: &[u8]) -> bool
Whether raw inline bytes must be escaped to avoid being interpreted as a value reference envelope.
Trait Implementations§
impl Eq for ValueRef
impl StructuralPartialEq for ValueRef
Auto Trait Implementations§
impl Freeze for ValueRef
impl RefUnwindSafe for ValueRef
impl Send for ValueRef
impl Sync for ValueRef
impl Unpin for ValueRef
impl UnsafeUnpin for ValueRef
impl UnwindSafe for ValueRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more