[][src]Struct swim_mem::lease::Raw

pub struct Raw<'a, R: Resident> { /* fields omitted */ }

An exclusive reference to a Resident occupying an owned, Hold-allocated memory block, with resident metadata stored with the pointer.

Methods

impl<'a, R: Resident> Raw<'a, R>[src]

pub fn try_hold_new_meta<T, M>(
    hold: &dyn Hold<'a>,
    data: T,
    meta: M
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentFromValue<Raw<'a, R>, T, M>, 
[src]

pub fn try_hold_clone_meta<T: ?Sized, M>(
    hold: &dyn Hold<'a>,
    data: &T,
    meta: M
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentFromClone<Raw<'a, R>, T, M>, 
[src]

pub unsafe fn try_hold_clone_unchecked_meta<T: ?Sized, M>(
    hold: &dyn Hold<'a>,
    data: &T,
    meta: M
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentFromCloneUnchecked<Raw<'a, R>, T, M>, 
[src]

pub fn try_hold_copy_meta<T: ?Sized, M>(
    hold: &dyn Hold<'a>,
    data: &T,
    meta: M
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentFromCopy<Raw<'a, R>, T, M>, 
[src]

pub unsafe fn try_hold_copy_unchecked_meta<T: ?Sized, M>(
    hold: &dyn Hold<'a>,
    data: &T,
    meta: M
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentFromCopyUnchecked<Raw<'a, R>, T, M>, 
[src]

pub fn try_hold_empty_meta<M>(
    hold: &dyn Hold<'a>,
    meta: M
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentFromEmpty<Raw<'a, R>, M>, 
[src]

pub fn try_hold_cap_meta<M>(
    hold: &dyn Hold<'a>,
    cap: usize,
    meta: M
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentWithCapacity<Raw<'a, R>, M>, 
[src]

pub fn try_hold_new<T>(
    hold: &dyn Hold<'a>,
    data: T
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentFromValue<Raw<'a, R>, T>, 
[src]

pub fn try_hold_clone<T: ?Sized>(
    hold: &dyn Hold<'a>,
    data: &T
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentFromClone<Raw<'a, R>, T>, 
[src]

pub unsafe fn try_hold_clone_unchecked<T: ?Sized>(
    hold: &dyn Hold<'a>,
    data: &T
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentFromCloneUnchecked<Raw<'a, R>, T>, 
[src]

pub fn try_hold_copy<T: ?Sized>(
    hold: &dyn Hold<'a>,
    data: &T
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentFromCopy<Raw<'a, R>, T>, 
[src]

pub unsafe fn try_hold_copy_unchecked<T: ?Sized>(
    hold: &dyn Hold<'a>,
    data: &T
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentFromCopyUnchecked<Raw<'a, R>, T>, 
[src]

pub fn try_hold_empty(hold: &dyn Hold<'a>) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentFromEmpty<Raw<'a, R>>, 
[src]

pub fn try_hold_cap(
    hold: &dyn Hold<'a>,
    cap: usize
) -> Result<Raw<'a, R>, HoldError> where
    R: ResidentWithCapacity<Raw<'a, R>>, 
[src]

pub fn hold_new<T>(hold: &dyn Hold<'a>, data: T) -> Raw<'a, R> where
    R: ResidentFromValue<Raw<'a, R>, T>, 
[src]

pub fn hold_clone<T: ?Sized>(hold: &dyn Hold<'a>, data: &T) -> Raw<'a, R> where
    R: ResidentFromClone<Raw<'a, R>, T>, 
[src]

pub unsafe fn hold_clone_unchecked<T: ?Sized>(
    hold: &dyn Hold<'a>,
    data: &T
) -> Raw<'a, R> where
    R: ResidentFromCloneUnchecked<Raw<'a, R>, T>, 
[src]

pub fn hold_copy<T: ?Sized>(hold: &dyn Hold<'a>, data: &T) -> Raw<'a, R> where
    R: ResidentFromCopy<Raw<'a, R>, T>, 
[src]

pub unsafe fn hold_copy_unchecked<T: ?Sized>(
    hold: &dyn Hold<'a>,
    data: &T
) -> Raw<'a, R> where
    R: ResidentFromCopyUnchecked<Raw<'a, R>, T>, 
[src]

pub fn hold_empty(hold: &dyn Hold<'a>) -> Raw<'a, R> where
    R: ResidentFromEmpty<Raw<'a, R>>, 
[src]

pub fn hold_cap(hold: &dyn Hold<'a>, cap: usize) -> Raw<'a, R> where
    R: ResidentWithCapacity<Raw<'a, R>>, 
[src]

pub fn new<T>(data: T) -> Raw<'a, R> where
    R: ResidentFromValue<Raw<'a, R>, T>, 
[src]

pub fn from_clone<T: ?Sized>(data: &T) -> Raw<'a, R> where
    R: ResidentFromClone<Raw<'a, R>, T>, 
[src]

pub unsafe fn from_clone_unchecked<T: ?Sized>(data: &T) -> Raw<'a, R> where
    R: ResidentFromCloneUnchecked<Raw<'a, R>, T>, 
[src]

pub fn from_copy<T: ?Sized>(data: &T) -> Raw<'a, R> where
    R: ResidentFromCopy<Raw<'a, R>, T>, 
[src]

pub unsafe fn from_copy_unchecked<T: ?Sized>(data: &T) -> Raw<'a, R> where
    R: ResidentFromCopyUnchecked<Raw<'a, R>, T>, 
[src]

pub fn empty() -> Raw<'a, R> where
    R: ResidentFromEmpty<Raw<'a, R>>, 
[src]

pub fn with_cap(cap: usize) -> Raw<'a, R> where
    R: ResidentWithCapacity<Raw<'a, R>>, 
[src]

pub unsafe fn from_raw_meta(data: *mut R::Data, meta: R::Meta) -> Raw<'a, R>[src]

pub unsafe fn into_raw_meta(this: Raw<'a, R>) -> (*mut R::Data, R::Meta)[src]

pub fn unwrap(this: Raw<'a, R>) -> R::Target where
    R: ResidentUnwrap<Raw<'a, R>>, 
[src]

impl<'a, R: Resident<Meta = ()>> Raw<'a, R>[src]

pub unsafe fn from_raw(data: *mut R::Data) -> Raw<'a, R>[src]

pub unsafe fn into_raw(this: Raw<'a, R>) -> *mut R::Data[src]

Trait Implementations

impl<'a, R: Resident> Holder<'a> for Raw<'a, R>[src]

impl<'a, 'b, R: ResidentStow<'b, Raw<'a, R>, Raw<'b, R>>> StowFrom<'b, Raw<'a, R>> for Raw<'b, R>[src]

fn stow_from(value: T, hold: &dyn Hold<'b>) -> Self[src]

impl<'a, 'b, R: ResidentStow<'b, Raw<'a, R>, Raw<'b, R>>> Stow<'b, Raw<'b, R>> for Raw<'a, R>[src]

impl<'a, R: ResidentClone<Raw<'a, R>, Raw<'a, R>>> TryClone for Raw<'a, R>[src]

impl<'a, 'b, R: ResidentClone<Raw<'b, R>, Raw<'a, R>>> CloneIntoHold<'a, Raw<'a, R>> for Raw<'b, R>[src]

fn clone_into_hold(&self, hold: &dyn Hold<'a>) -> T[src]

Returns a clone of self allocated in hold. Read more

impl<'a, R: Resident> Lease for Raw<'a, R>[src]

type Data = R::Data

The type of pointed-to data stored in leased memory blocks. The size of leased memory blocks must be a positive multiple of the Data size. Read more

type Meta = R::Meta

The type of metadata stored with leased memory blocks. Meta data must contain sufficient information to resolve the size of any resided-in memory Lease. Read more

impl<'a, R: Resident> DynamicLease<'a> for Raw<'a, R>[src]

impl<'a, R: ResidentPartialEq<Raw<'a, R>, T>, T: ?Sized> PartialEq<T> for Raw<'a, R>[src]

impl<'a, R: ResidentEq<Raw<'a, R>>> Eq for Raw<'a, R>[src]

impl<'a, R: ResidentOrd<Raw<'a, R>>> Ord for Raw<'a, R>[src]

default fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

default fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

default fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<'a, R: ResidentPartialOrd<Raw<'a, R>, T>, T: ?Sized> PartialOrd<T> for Raw<'a, R>[src]

impl<'a, R: ResidentDeref<Raw<'a, R>>> Deref for Raw<'a, R>[src]

type Target = R::Target

The resulting type after dereferencing.

impl<'a, R: ResidentDisplay<Raw<'a, R>>> Display for Raw<'a, R>[src]

impl<'a, R: ResidentDebug<Raw<'a, R>>> Debug for Raw<'a, R>[src]

impl<'a, R: ResidentAdd<Raw<'a, R>, Rhs>, Rhs> Add<Rhs> for Raw<'a, R>[src]

type Output = R::Output

The resulting type after applying the + operator.

impl<'a, R: ResidentAddAssign<Raw<'a, R>, Rhs>, Rhs> AddAssign<Rhs> for Raw<'a, R>[src]

impl<'a, R: ResidentDerefMut<Raw<'a, R>>> DerefMut for Raw<'a, R>[src]

impl<'a, R: Resident> Drop for Raw<'a, R>[src]

impl<'a, R: ResidentIndex<Raw<'a, R>, Idx>, Idx> Index<Idx> for Raw<'a, R>[src]

type Output = R::Output

The returned type after indexing.

impl<'a, R: ResidentIndexMut<Raw<'a, R>, Idx>, Idx> IndexMut<Idx> for Raw<'a, R>[src]

impl<'a, R: ResidentHash<Raw<'a, R>>> Hash for Raw<'a, R>[src]

default fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a, R: Resident> Sync for Raw<'a, R> where
    R::Data: Sync,
    R::Meta: Sync
[src]

impl<'a, R: ResidentIntoIterator<Raw<'a, R>>> IntoIterator for Raw<'a, R>[src]

type Item = R::Item

The type of the elements being iterated over.

type IntoIter = R::IntoIter

Which kind of iterator are we turning this into?

impl<'a, R: ResidentIntoRefIterator<'a, Raw<'a, R>>> IntoIterator for &'a Raw<'a, R>[src]

type Item = R::Item

The type of the elements being iterated over.

type IntoIter = R::IntoIter

Which kind of iterator are we turning this into?

impl<'a, R: ResidentIntoMutIterator<'a, Raw<'a, R>>> IntoIterator for &'a mut Raw<'a, R>[src]

type Item = R::Item

The type of the elements being iterated over.

type IntoIter = R::IntoIter

Which kind of iterator are we turning this into?

impl<'a, R: Resident> Send for Raw<'a, R> where
    R::Data: Send,
    R::Meta: Send
[src]

impl<'a, R: Resident> Pointer for Raw<'a, R>[src]

impl<'a, R: ResidentClone<Raw<'a, R>, Raw<'a, R>>> Clone for Raw<'a, R>[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a, R: ResidentAsMut<Raw<'a, R>, T>, T: ?Sized> AsMut<T> for Raw<'a, R>[src]

impl<'a, R: ResidentAsRef<Raw<'a, R>, T>, T: ?Sized> AsRef<T> for Raw<'a, R>[src]

Blanket Implementations

impl<T> From for T[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]