[−][src]Enum b3_rs::ItemKey
An item key.
Variants
No key is set for this item.
IntegerKey(u64)
The key is a UVarInt
(unsigned LEB128).
StringKey(String)
The key is a UTF-8 encoded string.
The key is encoded as the length of the UTF-8 string in bytes as a
UVarInt
(unsigned LEB128), and then the bytes of the string.
The key is a byte array.
The key is encoded as the length of the byte array as a UVarInt
(unsigned LEB128), and then the bytes.
Implementations
impl ItemKey
[src]
pub fn type_bits(&self) -> u8
[src]
Return the bits that would be set in the item control byte for the key type.
pub fn encode(&self) -> Result<Vec<u8>, Error>
[src]
Encode the key into it's byte representation.
pub fn decode(base: u8, ext: &[u8]) -> Result<(Self, usize), Error>
[src]
Trait Implementations
impl Clone for ItemKey
[src]
impl Debug for ItemKey
[src]
impl<'_> From<&'_ [u8]> for ItemKey
[src]
impl<'_> From<&'_ str> for ItemKey
[src]
impl From<String> for ItemKey
[src]
impl From<Vec<u8>> for ItemKey
[src]
impl From<u64> for ItemKey
[src]
impl PartialEq<ItemKey> for ItemKey
[src]
impl StructuralPartialEq for ItemKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for ItemKey
impl Send for ItemKey
impl Sync for ItemKey
impl Unpin for ItemKey
impl UnwindSafe for ItemKey
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,