pub struct DecisionRandomEvidence {
pub draw_id: RandomDrawId,
pub value: u64,
pub upper_exclusive: u64,
pub option_weights: Vec<DecisionOptionWeight>,
}Fields§
§draw_id: RandomDrawId§value: u64§upper_exclusive: u64§option_weights: Vec<DecisionOptionWeight>Implementations§
Source§impl DecisionRandomEvidence
impl DecisionRandomEvidence
pub fn selected_option( ticket: &DecisionTicket, option_weights: &[DecisionOptionWeight], value: u64, ) -> Result<String, DecisionError>
pub fn selected_option_from_weights( option_weights: &[DecisionOptionWeight], value: u64, upper_exclusive: u64, ) -> Result<String, DecisionError>
Trait Implementations§
Source§impl Clone for DecisionRandomEvidence
impl Clone for DecisionRandomEvidence
Source§fn clone(&self) -> DecisionRandomEvidence
fn clone(&self) -> DecisionRandomEvidence
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 DecisionRandomEvidence
impl Debug for DecisionRandomEvidence
Source§impl<'de> Deserialize<'de> for DecisionRandomEvidence
impl<'de> Deserialize<'de> for DecisionRandomEvidence
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DecisionRandomEvidence, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DecisionRandomEvidence, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DecisionRandomEvidence
Source§impl PartialEq for DecisionRandomEvidence
impl PartialEq for DecisionRandomEvidence
Source§impl Serialize for DecisionRandomEvidence
impl Serialize for DecisionRandomEvidence
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for DecisionRandomEvidence
Auto Trait Implementations§
impl Freeze for DecisionRandomEvidence
impl RefUnwindSafe for DecisionRandomEvidence
impl Send for DecisionRandomEvidence
impl Sync for DecisionRandomEvidence
impl Unpin for DecisionRandomEvidence
impl UnsafeUnpin for DecisionRandomEvidence
impl UnwindSafe for DecisionRandomEvidence
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