[−][src]Struct transistor::types::http::Actions
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 areappend_put
andappend_put_timed
.Delete
- Deletes the specific document at a given valid time. Functions areappend_delete
andappend_delete_timed
.Evict
- Evicts a document entirely, including all historical versions (receives only the ID to evict). Function isappend_evict
.Match
- Matches the current state of an entity, if the state doesn't match the provided document, the transaction will not continue. Functions areappend_match
andappend_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]
self,
action: T,
date: DateTime<FixedOffset>
) -> Self
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]
self,
id: CruxId,
date: DateTime<FixedOffset>
) -> Self
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]
self,
id: CruxId,
action: T,
date: DateTime<FixedOffset>
) -> Self
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]
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<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,