Struct Durability

Source
pub struct Durability<SOk, SErr> { /* private fields */ }

Implementations§

Source§

impl<SOk, SErr> Durability<SOk, SErr>

Source

pub fn new( interface: &'static str, function: &'static str, function_type: DurableFunctionType, ) -> Self

Source

pub fn enabled_forced_commit(&mut self)

Source

pub fn is_live(&self) -> bool

Source

pub fn persist<SIn, Ok, Err>( &self, input: SIn, result: Result<Ok, Err>, ) -> Result<Ok, Err>
where Ok: Clone, Err: From<SErr>, SIn: Debug + IntoValueAndType, SErr: Debug + for<'a> From<&'a Err>, SOk: Debug + From<Ok>, Result<SOk, SErr>: IntoValueAndType,

Source

pub fn persist_infallible<SIn, Ok>(&self, input: SIn, result: Ok) -> Ok
where Ok: Clone, SIn: Debug + IntoValueAndType, SOk: Debug + From<Ok>, SErr: Debug, Result<SOk, SErr>: IntoValueAndType,

Source

pub fn persist_serializable<SIn>(&self, input: SIn, result: Result<SOk, SErr>)
where SIn: Debug + IntoValueAndType, Result<SOk, SErr>: IntoValueAndType,

Source

pub fn replay_raw(&self) -> (ValueAndType, OplogEntryVersion)

Source

pub fn replay_serializable(&self) -> Result<SOk, SErr>

Source

pub fn replay<Ok, Err>(&self) -> Result<Ok, Err>
where Ok: From<SOk>, Err: From<SErr>, SErr: Debug + FromValueAndType, SOk: Debug + FromValueAndType,

Source

pub fn replay_infallible<Ok>(&self) -> Ok
where Ok: From<SOk>, SOk: FromValueAndType, SErr: FromValueAndType + Display,

Auto Trait Implementations§

§

impl<SOk, SErr> Freeze for Durability<SOk, SErr>

§

impl<SOk, SErr> RefUnwindSafe for Durability<SOk, SErr>
where SOk: RefUnwindSafe, SErr: RefUnwindSafe,

§

impl<SOk, SErr> Send for Durability<SOk, SErr>
where SOk: Send, SErr: Send,

§

impl<SOk, SErr> Sync for Durability<SOk, SErr>
where SOk: Sync, SErr: Sync,

§

impl<SOk, SErr> Unpin for Durability<SOk, SErr>
where SOk: Unpin, SErr: Unpin,

§

impl<SOk, SErr> UnwindSafe for Durability<SOk, SErr>
where SOk: UnwindSafe, SErr: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> TupleOrUnit<()> for T

Source§

fn into(self)