pub struct BucketApi<T: Clone + Copy> {
pub stats: Arc<BucketMapStats>,
/* private fields */
}
Fields§
§stats: Arc<BucketMapStats>
Implementations§
Source§impl<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>>where
R: RangeBounds<Pubkey>,
pub fn items_in_range<R>(&self, range: &Option<&R>) -> Vec<BucketItem<T>>where
R: RangeBounds<Pubkey>,
Get the items for bucket
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)
pub fn try_write( &self, pubkey: &Pubkey, value: (&[T], RefCount), ) -> Result<(), BucketMapError>
Auto Trait Implementations§
impl<T> !Freeze for BucketApi<T>
impl<T> RefUnwindSafe for BucketApi<T>
impl<T> Send for BucketApi<T>where
T: Send,
impl<T> Sync for BucketApi<T>
impl<T> Unpin for BucketApi<T>where
T: Unpin,
impl<T> UnwindSafe for BucketApi<T>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more