Skip to main content

ResidencyTransfer

Struct ResidencyTransfer 

Source
pub struct ResidencyTransfer<L, C, R, O>
where O: ResidencyTransferOwner<C, R>,
{ /* private fields */ }
Expand description

Caller-owned exact transfer and source-lifetime guard.

Implementations§

Source§

impl<L, C, R, O> ResidencyTransfer<L, C, R, O>
where O: ResidencyTransferOwner<C, R>,

Source

pub fn immediate(leases: Vec<L>, tier: MemoryTier) -> Self

Creates an already-complete transfer containing only resident leases.

Source

pub fn submitted( leases: Vec<L>, completion: C, resources: R, owner: Weak<O>, ids: Vec<OffloadUnitId>, tier: MemoryTier, generation: u64, ) -> Self

Creates an in-flight transfer owning its exact completion and retained resources.

Source

pub fn leases(&self) -> &[L]

Returns resident unit leases protected by this transfer.

Source

pub fn is_empty(&self) -> bool

Returns whether the transfer contains no resident units.

Source

pub fn order_after(&self, executor: &O::Executor) -> Result<(), O::Error>

Orders dependent backend work after this exact transfer.

Source

pub fn is_complete(&self) -> Result<bool, O::Error>

Returns whether this exact transfer completed without blocking.

Source

pub fn synchronize(&mut self) -> Result<(), O::Error>

Waits for exact completion and publishes or rolls back the transfer.

Trait Implementations§

Source§

impl<L, C, R, O> Drop for ResidencyTransfer<L, C, R, O>
where O: ResidencyTransferOwner<C, R>,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<L, C, R, O> Freeze for ResidencyTransfer<L, C, R, O>
where Vec<L>: Freeze, Option<C>: Freeze, Option<R>: Freeze, Weak<O>: Freeze,

§

impl<L, C, R, O> RefUnwindSafe for ResidencyTransfer<L, C, R, O>

§

impl<L, C, R, O> Send for ResidencyTransfer<L, C, R, O>
where Vec<L>: Send, Option<C>: Send, Option<R>: Send, Weak<O>: Send,

§

impl<L, C, R, O> Sync for ResidencyTransfer<L, C, R, O>
where Vec<L>: Sync, Option<C>: Sync, Option<R>: Sync, Weak<O>: Sync,

§

impl<L, C, R, O> Unpin for ResidencyTransfer<L, C, R, O>
where Vec<L>: Unpin, Option<C>: Unpin, Option<R>: Unpin, Weak<O>: Unpin,

§

impl<L, C, R, O> UnsafeUnpin for ResidencyTransfer<L, C, R, O>

§

impl<L, C, R, O> UnwindSafe for ResidencyTransfer<L, C, R, O>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.