[−][src]Struct transact::context::Context
Methods
impl Context
[src]
pub fn new(state_id: &str, base_contexts: Vec<ContextId>) -> Self
[src]
pub fn base_contexts(&self) -> &[ContextId]
[src]
pub fn events(&self) -> &Vec<Event>
[src]
pub fn state_changes(&self) -> &Vec<StateChange>
[src]
pub fn id(&self) -> &ContextId
[src]
pub fn data(&self) -> &Vec<Vec<u8>>
[src]
pub fn state_id(&self) -> &String
[src]
pub fn add_event(&mut self, event: Event)
[src]
pub fn add_data(&mut self, data: Vec<u8>)
[src]
pub fn get_state(&self, key: &str) -> Option<&[u8]>
[src]
pub fn set_state(&mut self, key: String, value: Vec<u8>)
[src]
Adds StateChange::Set without deleting previous StateChanges associated with the Key
pub fn delete_state(&mut self, key: &str) -> Option<Vec<u8>>
[src]
Adds StateChange::Delete and returns the value associated to the key being deleted
pub fn contains(&self, key: &str) -> bool
[src]
Checks to see if the Key is referenced by any StateChanges within the Context
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Clone + Send + Sync,
T: 'a + Clone + Send + Sync,
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
T: 'a + Clone,
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,