#[repr(transparent)]pub struct CrushMap {
pub ptr: *mut crush_map,
}Fields§
§ptr: *mut crush_mapImplementations§
Source§impl CrushMap
impl CrushMap
pub fn new() -> Self
pub fn new_legacy() -> Self
pub fn choose_local_tries(&self) -> u32
pub fn choose_local_fallback_tries(&self) -> u32
pub fn choose_total_tries(&self) -> u32
pub fn chooseleaf_descend_once(&self) -> u32
pub fn chooseleaf_vary_r(&self) -> u8
pub fn chooseleaf_stable(&self) -> u8
pub fn straw_calc_version(&self) -> u8
pub fn allowed_bucket_algs(&self) -> u32
pub fn has_rules(&self) -> bool
pub fn max_buckets(&self) -> i32
pub fn make_bucket( &mut self, alg: BucketAlgorithm, hash: i32, type_: i32, items: &[i32], weights: &[i32], ) -> Result<Bucket, &'static str>
pub fn add_bucket(&mut self, id: i32, bucket: Bucket) -> Result<i32, i32>
pub fn find_roots(&self) -> Result<Vec<i32>, i32>
pub fn finalize(&mut self)
pub fn make_choose_args(&self, num_positions: i32) -> ChooseArgs
pub fn add_rule(&mut self, rule: Rule, ruleno: i32) -> i32
pub fn do_rule( &self, ruleno: i32, x: i32, result: &mut [i32], weights: &[u32], choose_args: Option<&ChooseArgs>, ) -> Result<usize, &'static str>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CrushMap
impl RefUnwindSafe for CrushMap
impl !Send for CrushMap
impl !Sync for CrushMap
impl Unpin for CrushMap
impl UnwindSafe for CrushMap
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