fvm-std 1.0.0

tool for user to write contract which will be run in hyperchain with rust
Documentation
pub struct ValueWrapper<T> {
    pub value: Option<T>,
    pub state: EntryState,
}

impl<T> ValueWrapper<T> {
    pub fn new(value: T, state: EntryState) -> Self {
        ValueWrapper {
            value: Some(value),
            state,
        }
    }

    pub fn new_empty_value(state: EntryState) -> Self {
        ValueWrapper {
            value: None,
            state,
        }
    }
}


/// The state of the entry.
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub enum EntryState {
    /// The entry's value has been changed and must be synchronized with the contract storage.
    Changed,
    /// The entry's value no changed.
    NoChanged,
    /// the entry's value is deleted
    Deleted,
}