pub struct WeightedRandomSamplerState {
pub weight_bits: Vec<u64>,
pub num_samples: u64,
pub replacement: bool,
pub seed: u64,
pub epoch: u64,
pub position: u64,
}Expand description
Serialized configuration and cursor for WeightedRandomSampler.
Fields§
§weight_bits: Vec<u64>Exact IEEE-754 bit patterns of the configured weights.
num_samples: u64Number of generated occurrences.
replacement: boolReplacement policy.
seed: u64Base seed.
epoch: u64Active epoch.
position: u64Next occurrence position.
Trait Implementations§
Source§impl Clone for WeightedRandomSamplerState
impl Clone for WeightedRandomSamplerState
Source§fn clone(&self) -> WeightedRandomSamplerState
fn clone(&self) -> WeightedRandomSamplerState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WeightedRandomSamplerState
impl Debug for WeightedRandomSamplerState
Source§impl<'de> Deserialize<'de> for WeightedRandomSamplerState
impl<'de> Deserialize<'de> for WeightedRandomSamplerState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WeightedRandomSamplerState
impl RefUnwindSafe for WeightedRandomSamplerState
impl Send for WeightedRandomSamplerState
impl Sync for WeightedRandomSamplerState
impl Unpin for WeightedRandomSamplerState
impl UnsafeUnpin for WeightedRandomSamplerState
impl UnwindSafe for WeightedRandomSamplerState
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