pub enum IndexValue {
Integer(u32),
Bytes(Vec<u8>),
}Expand description
One key value inside an index entry.
Variants§
Integer(u32)
An integer attribute: four raw bytes, no length prefix.
Bytes(Vec<u8>)
Anything else: length-prefixed bytes, padded to a 4-byte boundary.
Implementations§
Source§impl IndexValue
impl IndexValue
Sourcepub fn from_value(value: Option<&Value>, format: AttributeFormat) -> Self
pub fn from_value(value: Option<&Value>, format: AttributeFormat) -> Self
The key form of an attribute value, given the attribute’s format.
Trait Implementations§
Source§impl Clone for IndexValue
impl Clone for IndexValue
Source§fn clone(&self) -> IndexValue
fn clone(&self) -> IndexValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexValue
impl Debug for IndexValue
impl Eq for IndexValue
Source§impl Ord for IndexValue
impl Ord for IndexValue
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
Source§impl PartialEq for IndexValue
impl PartialEq for IndexValue
Source§impl PartialOrd for IndexValue
impl PartialOrd for IndexValue
impl StructuralPartialEq for IndexValue
Auto Trait Implementations§
impl Freeze for IndexValue
impl RefUnwindSafe for IndexValue
impl Send for IndexValue
impl Sync for IndexValue
impl Unpin for IndexValue
impl UnsafeUnpin for IndexValue
impl UnwindSafe for IndexValue
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