pub struct Random {
pub id: UID,
pub inner: Versioned,
}
Expand description
Singleton shared object which stores the global randomness state. The actual state is stored in a versioned inner field.
Fields§
§id: UID
§inner: Versioned
Implementations§
Source§impl Random
impl Random
pub fn move_instance(self) -> MoveInstance<Self>
pub fn type_() -> RandomTypeTag
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Random
impl<'de> Deserialize<'de> for Random
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
Source§impl MoveStruct for Random
impl MoveStruct for Random
type StructTag = RandomTypeTag
Source§impl MoveType for Random
impl MoveType for Random
Source§impl StaticModule for Random
impl StaticModule for Random
fn module() -> Identifier
Source§impl StaticName for Random
impl StaticName for Random
fn name() -> Identifier
Source§impl StaticTypeParams for Random
impl StaticTypeParams for Random
fn type_params() -> Vec<TypeTag>
impl Eq for Random
impl StructuralPartialEq for Random
Auto Trait Implementations§
impl Freeze for Random
impl RefUnwindSafe for Random
impl Send for Random
impl Sync for Random
impl Unpin for Random
impl UnwindSafe for Random
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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