[][src]Struct transistor::types::http::Actions

pub struct Actions { /* fields omitted */ }

Actions to perform in Crux. It is a builder struct to help you create a Vec<Action> for tx_log.

Allowed actions:

  • PUT - Write a version of a document. Functions are append_put and append_put_timed.
  • Delete - Deletes the specific document at a given valid time. Functions are append_delete and append_delete_timed.
  • Evict - Evicts a document entirely, including all historical versions (receives only the ID to evict). Function is append_evict.
  • Match - Matches the current state of an entity, if the state doesn't match the provided document, the transaction will not continue. Functions are append_match and append_match_timed.

Implementations

impl Actions[src]

pub fn new() -> Self[src]

pub fn append_put<T: Serialize>(self, action: T) -> Self[src]

Appends an Action::Put enforcing types for action field to be a T: Serialize

pub fn append_put_timed<T: Serialize>(
    self,
    action: T,
    date: DateTime<FixedOffset>
) -> Self
[src]

Appends an Action::Put that includes date enforcing types for action field to be a T: Serialize and date to be DateTime<FixedOffset>.

pub fn append_delete(self, id: CruxId) -> Self[src]

Appends an Action::Delete enforcing types for id field to be a CruxId

pub fn append_delete_timed(
    self,
    id: CruxId,
    date: DateTime<FixedOffset>
) -> Self
[src]

Appends an Action::Delete that includes date enforcing types for id field to be a CruxId and date to be DateTime<FixedOffset>.

pub fn append_evict(self, id: CruxId) -> Self[src]

Appends an Action::Evict enforcing types for id field to be a CruxId

pub fn append_match_doc<T: Serialize>(self, id: CruxId, action: T) -> Self[src]

Appends an Action::Match enforcing types for id field to be a CruxId and action field to be a T: Serialize

pub fn append_match_doc_timed<T: Serialize>(
    self,
    id: CruxId,
    action: T,
    date: DateTime<FixedOffset>
) -> Self
[src]

Appends an Action::Match that includes date enforcing types for id field to be a CruxId, action field to be a T: Serialize and date to be DateTime<FixedOffset>.

Trait Implementations

impl Clone for Actions[src]

impl Debug for Actions[src]

impl PartialEq<Actions> for Actions[src]

impl StructuralPartialEq for Actions[src]

Auto Trait Implementations

impl RefUnwindSafe for Actions

impl Send for Actions

impl Sync for Actions

impl Unpin for Actions

impl UnwindSafe for Actions

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.