pub enum StateCommandResultV1 {
Show 13 variants
Get {
value: Option<StateDataValueV1>,
},
Set {
applied: bool,
},
Delete {
removed: u32,
},
Exists {
count: u32,
},
Expire {
changed: bool,
},
TtlStatus {
status: StateTtlStatusResultV1,
},
Persist {
changed: bool,
},
MultiGet {
values: Vec<Option<StateDataValueV1>>,
},
MultiSet {
written: u32,
},
Increment {
value: i64,
},
HashGet {
value: Option<Vec<u8>>,
},
HashSet {
fields_added: u32,
},
HashGetAll {
fields: Vec<StateHashFieldV1>,
},
}Variants§
Get
Fields
§
value: Option<StateDataValueV1>Set
Delete
Exists
Expire
TtlStatus
Fields
§
status: StateTtlStatusResultV1Persist
MultiGet
Fields
§
values: Vec<Option<StateDataValueV1>>MultiSet
Increment
HashGet
HashSet
HashGetAll
Fields
§
fields: Vec<StateHashFieldV1>Implementations§
Source§impl StateCommandResultV1
impl StateCommandResultV1
pub fn validate_for( &self, command: &StateCommandV1, ) -> Result<(), StateContractError>
pub fn validate_for_expectation( &self, expectation: StateCommandResultExpectation, ) -> Result<(), StateContractError>
pub fn as_write_result(&self) -> Option<StateWriteResultV1>
Trait Implementations§
Source§impl Clone for StateCommandResultV1
impl Clone for StateCommandResultV1
Source§impl Debug for StateCommandResultV1
impl Debug for StateCommandResultV1
Source§impl<'de> Deserialize<'de> for StateCommandResultV1
impl<'de> Deserialize<'de> for StateCommandResultV1
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
impl Eq for StateCommandResultV1
Source§impl PartialEq for StateCommandResultV1
impl PartialEq for StateCommandResultV1
Source§impl Serialize for StateCommandResultV1
impl Serialize for StateCommandResultV1
impl StructuralPartialEq for StateCommandResultV1
Auto Trait Implementations§
impl Freeze for StateCommandResultV1
impl RefUnwindSafe for StateCommandResultV1
impl Send for StateCommandResultV1
impl Sync for StateCommandResultV1
impl Unpin for StateCommandResultV1
impl UnsafeUnpin for StateCommandResultV1
impl UnwindSafe for StateCommandResultV1
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