gear_core::env

Struct DropPayloadLockBound

Source
pub struct DropPayloadLockBound<JobError> { /* private fields */ }
Expand description

Result of calling a job within PayloadSliceLock::drop_with.

This is a “bound” type which means it’s main purpose is to give some type-level guarantees. More precisely, it gives guarantee that payload value was reclaimed/unlocked by the owner. Also it stores the error of the job, which gives opportunity to handle the actual job’s runtime error, but not bound wrappers.

Implementations§

Source§

impl<JobErr> DropPayloadLockBound<JobErr>

Source

pub fn into_inner(self) -> Result<(), JobErr>

Convert into inner job of the PayloadSliceLock::drop_with result.

Trait Implementations§

Source§

impl<JobErr> From<(UnlockPayloadBound, Result<(), JobErr>)> for DropPayloadLockBound<JobErr>

Source§

fn from((_token, job_result): (UnlockPayloadBound, Result<(), JobErr>)) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<JobError> Freeze for DropPayloadLockBound<JobError>
where JobError: Freeze,

§

impl<JobError> RefUnwindSafe for DropPayloadLockBound<JobError>
where JobError: RefUnwindSafe,

§

impl<JobError> Send for DropPayloadLockBound<JobError>
where JobError: Send,

§

impl<JobError> Sync for DropPayloadLockBound<JobError>
where JobError: Sync,

§

impl<JobError> Unpin for DropPayloadLockBound<JobError>
where JobError: Unpin,

§

impl<JobError> UnwindSafe for DropPayloadLockBound<JobError>
where JobError: 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> Same for T

Source§

type Output = T

Should always be Self
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> JsonSchemaMaybe for T