#[repr(i32)]pub enum RandomDistribution {
RngInvalid = 0,
RngUniform = 1,
RngNormal = 2,
}Variants§
RngInvalid = 0
RngUniform = 1
Creates a uniform-distribution-generated random number on the semi-open interval [parameter[0], parameter[1]).
RngNormal = 2
Creates a normal-distribution-generated random number with mean parameter[0] and standard deviation parameter[1].
Implementations§
Source§impl RandomDistribution
impl RandomDistribution
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for RandomDistribution
impl Clone for RandomDistribution
Source§fn clone(&self) -> RandomDistribution
fn clone(&self) -> RandomDistribution
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RandomDistribution
impl Debug for RandomDistribution
Source§impl Default for RandomDistribution
impl Default for RandomDistribution
Source§fn default() -> RandomDistribution
fn default() -> RandomDistribution
Returns the “default value” for a type. Read more
Source§impl From<RandomDistribution> for i32
impl From<RandomDistribution> for i32
Source§fn from(value: RandomDistribution) -> i32
fn from(value: RandomDistribution) -> i32
Converts to this type from the input type.
Source§impl Hash for RandomDistribution
impl Hash for RandomDistribution
Source§impl Ord for RandomDistribution
impl Ord for RandomDistribution
Source§impl PartialEq for RandomDistribution
impl PartialEq for RandomDistribution
Source§impl PartialOrd for RandomDistribution
impl PartialOrd for RandomDistribution
Source§impl TryFrom<i32> for RandomDistribution
impl TryFrom<i32> for RandomDistribution
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<RandomDistribution, UnknownEnumValue>
fn try_from(value: i32) -> Result<RandomDistribution, UnknownEnumValue>
Performs the conversion.
impl Copy for RandomDistribution
impl Eq for RandomDistribution
impl StructuralPartialEq for RandomDistribution
Auto Trait Implementations§
impl Freeze for RandomDistribution
impl RefUnwindSafe for RandomDistribution
impl Send for RandomDistribution
impl Sync for RandomDistribution
impl Unpin for RandomDistribution
impl UnwindSafe for RandomDistribution
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)