Struct solana_bucket_map::bucket_api::BucketApi
source · [−]Fields
stats: Arc<BucketMapStats>
Implementations
sourceimpl<T: Clone + Copy> BucketApi<T>
impl<T: Clone + Copy> BucketApi<T>
pub fn new(
drives: Arc<Vec<PathBuf>>,
max_search: MaxSearch,
stats: Arc<BucketMapStats>
) -> Self
sourcepub fn items_in_range<R>(&self, range: &Option<&R>) -> Vec<BucketItem<T>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
where
R: RangeBounds<Pubkey>,
pub fn items_in_range<R>(&self, range: &Option<&R>) -> Vec<BucketItem<T>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
where
R: RangeBounds<Pubkey>,
A: Allocator,
Get the items for bucket
sourcepub fn keys(&self) -> Vec<Pubkey>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn keys(&self) -> Vec<Pubkey>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Get the Pubkeys
sourcepub fn read_value(&self, key: &Pubkey) -> Option<(Vec<T>, RefCount)>
pub fn read_value(&self, key: &Pubkey) -> Option<(Vec<T>, RefCount)>
Get the values for Pubkey key
pub fn bucket_len(&self) -> u64
pub fn delete_key(&self, key: &Pubkey)
pub fn addref(&self, key: &Pubkey) -> Option<RefCount>
pub fn unref(&self, key: &Pubkey) -> Option<RefCount>
pub fn insert(&self, pubkey: &Pubkey, value: (&[T], RefCount))
pub fn grow(&self, err: BucketMapError)
pub fn update<F>(&self, key: &Pubkey, updatefn: F) where
F: FnMut(Option<(&[T], RefCount)>) -> Option<(Vec<T>, RefCount)>,
pub fn try_write(
&self,
pubkey: &Pubkey,
value: (&[T], RefCount)
) -> Result<(), BucketMapError>
Auto Trait Implementations
impl<T> RefUnwindSafe for BucketApi<T>
impl<T> Send for BucketApi<T> where
T: Send,
impl<T> Sync for BucketApi<T> where
T: Send + Sync,
impl<T> Unpin for BucketApi<T> where
T: Unpin,
impl<T> UnwindSafe for BucketApi<T>
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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