Struct cfx_storage::CompressedPathRaw
source · pub struct CompressedPathRaw {
pub byte_array_memory_manager: FieldsOffsetMaybeInPlaceByteArrayMemoryManager<u16, TrivialSizeFieldConverterU16, CompressedPathRawByteArrayMemoryManager, CompressedPathRawByteArrayMemoryManager>,
/* private fields */
}
Fields§
§byte_array_memory_manager: FieldsOffsetMaybeInPlaceByteArrayMemoryManager<u16, TrivialSizeFieldConverterU16, CompressedPathRawByteArrayMemoryManager, CompressedPathRawByteArrayMemoryManager>
Implementations§
source§impl CompressedPathRaw
impl CompressedPathRaw
pub const NO_MISSING_NIBBLE: u8 = 0u8
source§impl CompressedPathRaw
impl CompressedPathRaw
sourcepub fn new(path_slice: &[u8], path_mask: u8) -> Self
pub fn new(path_slice: &[u8], path_mask: u8) -> Self
Create a new CompressedPathRaw from valid (path_slice, path_mask) combination.
pub fn new_and_apply_mask(path_slice: &[u8], path_mask: u8) -> Self
pub fn new_zeroed(path_size: u16, path_mask: u8) -> Self
pub const fn first_nibble_mask() -> u8
pub const fn second_nibble_mask() -> u8
pub fn from_first_nibble(x: u8) -> u8
pub fn first_nibble(x: u8) -> u8
pub fn clear_second_nibble(x: u8) -> u8
pub fn second_nibble(x: u8) -> u8
pub fn set_second_nibble(x: u8, second_nibble: u8) -> u8
pub fn has_second_nibble(path_mask: u8) -> bool
pub fn no_second_nibble(path_mask: u8) -> bool
pub fn extend_path<X: CompressedPathTrait>(x: &X, child_index: u8) -> Self
sourcepub fn join_connected_paths<X: CompressedPathTrait, Y: CompressedPathTrait>(
x: &X,
child_index: u8,
y: &Y
) -> Self
pub fn join_connected_paths<X: CompressedPathTrait, Y: CompressedPathTrait>( x: &X, child_index: u8, y: &Y ) -> Self
y must be a valid path following x. i.e. when x ends with a full byte, y must be non-empty and start with nibble child_index.
source§impl CompressedPathRaw
impl CompressedPathRaw
pub fn path_slice_mut(&mut self) -> &mut [u8] ⓘ
Trait Implementations§
source§impl Clone for CompressedPathRaw
impl Clone for CompressedPathRaw
source§impl Debug for CompressedPathRaw
impl Debug for CompressedPathRaw
source§impl Decodable for CompressedPathRaw
impl Decodable for CompressedPathRaw
source§impl Default for CompressedPathRaw
impl Default for CompressedPathRaw
source§fn default() -> CompressedPathRaw
fn default() -> CompressedPathRaw
Returns the “default value” for a type. Read more
source§impl<'a> Deserialize<'a> for CompressedPathRaw
impl<'a> Deserialize<'a> for CompressedPathRaw
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Encodable for CompressedPathRaw
impl Encodable for CompressedPathRaw
source§impl<'a> From<&'a [u8]> for CompressedPathRaw
impl<'a> From<&'a [u8]> for CompressedPathRaw
source§impl Hash for CompressedPathRaw
impl Hash for CompressedPathRaw
source§impl PartialEq for CompressedPathRaw
impl PartialEq for CompressedPathRaw
source§impl Serialize for CompressedPathRaw
impl Serialize for CompressedPathRaw
impl Eq for CompressedPathRaw
impl Send for CompressedPathRaw
CompressedPathRaw is Send + Sync.
impl Sync for CompressedPathRaw
Auto Trait Implementations§
impl RefUnwindSafe for CompressedPathRaw
impl Unpin for CompressedPathRaw
impl UnwindSafe for CompressedPathRaw
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