pub struct TimeLockServiceImpl { /* private fields */ }Expand description
Adapter delegating to the domain time-lock implementation.
Implementations§
Trait Implementations§
Source§impl Default for TimeLockServiceImpl
impl Default for TimeLockServiceImpl
Source§impl TimeLockService for TimeLockServiceImpl
impl TimeLockService for TimeLockServiceImpl
Source§fn lock(
&self,
payload: &Payload,
unlock_at: DateTime<Utc>,
) -> Result<TimeLockPuzzle, TimeLockError>
fn lock( &self, payload: &Payload, unlock_at: DateTime<Utc>, ) -> Result<TimeLockPuzzle, TimeLockError>
Source§fn unlock(&self, puzzle: &TimeLockPuzzle) -> Result<Payload, TimeLockError>
fn unlock(&self, puzzle: &TimeLockPuzzle) -> Result<Payload, TimeLockError>
Solve the
puzzle by sequential squaring and decrypt the payload. Read moreSource§fn try_unlock(
&self,
puzzle: &TimeLockPuzzle,
) -> Result<Option<Payload>, TimeLockError>
fn try_unlock( &self, puzzle: &TimeLockPuzzle, ) -> Result<Option<Payload>, TimeLockError>
Non-blocking puzzle check. Returns
Ok(Some(payload)) if the puzzle
is already solved, Ok(None) if it cannot yet be solved, or an error
if the computation itself fails. Read moreAuto Trait Implementations§
impl Freeze for TimeLockServiceImpl
impl RefUnwindSafe for TimeLockServiceImpl
impl Send for TimeLockServiceImpl
impl Sync for TimeLockServiceImpl
impl Unpin for TimeLockServiceImpl
impl UnsafeUnpin for TimeLockServiceImpl
impl UnwindSafe for TimeLockServiceImpl
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more