[−]Struct eosio_system::GLOBAL4
Methods from Deref<Target = SingletonIndex<EosioGlobalState4>>
pub fn exists(&self) -> bool
[src][−]
Checks if the singleton entry exists
pub fn get(&self) -> Option<Result<<T as Table>::Row, ReadError>>
[src][−]
Gets the value stored inside the singleton. Returns None
if no value
is found, or ReadError
if there was an issue reading the data.
pub fn get_or_default(&self) -> Result<<T as Table>::Row, ReadError> where
<T as Table>::Row: Default,
[src][−]
<T as Table>::Row: Default,
Gets the value stored inside the singleton or returns the default value.
Errors
Will return Err
if there was an issue deserializing the stored value.
pub fn set(
&self,
value: &<T as Table>::Row,
payer: AccountName
) -> Result<(), WriteError>
[src][−]
&self,
value: &<T as Table>::Row,
payer: AccountName
) -> Result<(), WriteError>
pub fn remove(&self) -> Result<Option<<T as Table>::Row>, ReadError>
[src][−]
Removes the singleton value if it exists. Returns ReadError
if there
was an issue reading the data, and None if there was no entry found
Errors
Will return Err
if there was an issue reading the stored value.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GLOBAL4
impl Send for GLOBAL4
impl Sync for GLOBAL4
impl Unpin for GLOBAL4
impl UnwindSafe for GLOBAL4
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,