Struct near_fixed_bit_tree::BitTree
source · [−]pub struct BitTree { /* private fields */ }
Implementations
sourceimpl BitTree
impl BitTree
pub fn new(max_bits: u32, key_prefix: Vec<u8>, bit_width: u8) -> Self
pub fn get(&self, key: &[u8]) -> Option<u8>
pub fn set(&mut self, key: &[u8], val: u8)
pub fn del(&mut self, key: &[u8])
pub fn check(&self, key: &[u8]) -> bool
pub fn get_and_set(&mut self, key: &[u8], val: u8) -> Option<u8>
pub fn check_and_set(&mut self, key: &[u8], val: u8) -> bool
Trait Implementations
sourceimpl BorshDeserialize for BitTreewhere
TreeMap: BorshDeserialize,
impl BorshDeserialize for BitTreewhere
TreeMap: BorshDeserialize,
sourcefn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes. Read more
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
Auto Trait Implementations
impl RefUnwindSafe for BitTree
impl Send for BitTree
impl Sync for BitTree
impl Unpin for BitTree
impl UnwindSafe for BitTree
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more