Skip to main content

ComposeProj

Struct ComposeProj 

Source
pub struct ComposeProj<P: ?Sized, Q> {
    q: Q,
    p: P,
}
Expand description

Projection P followed by Q. P may be unsized.

Fields§

§q: Q§p: P

Trait Implementations§

Source§

impl<P: Clone + ?Sized, Q: Clone> Clone for ComposeProj<P, Q>

Source§

fn clone(&self) -> ComposeProj<P, Q>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<P, Q> Projection for ComposeProj<P, Q>
where P: Projection + ?Sized, Q: Projection<Source = P::Target>,

Source§

type Source = <P as Projection>::Source

Source§

type Target = <Q as Projection>::Target

Source§

fn offset(&self, meta: <Self::Source as Pointee>::Metadata) -> usize

Source§

fn project_metadata( &self, meta: <Self::Source as Pointee>::Metadata, ) -> <Self::Target as Pointee>::Metadata

Auto Trait Implementations§

§

impl<P, Q> Freeze for ComposeProj<P, Q>
where Q: Freeze, P: Freeze + ?Sized,

§

impl<P, Q> RefUnwindSafe for ComposeProj<P, Q>

§

impl<P, Q> Send for ComposeProj<P, Q>
where Q: Send, P: Send + ?Sized,

§

impl<P, Q> Sync for ComposeProj<P, Q>
where Q: Sync, P: Sync + ?Sized,

§

impl<P, Q> Unpin for ComposeProj<P, Q>
where Q: Unpin, P: Unpin + ?Sized,

§

impl<P, Q> UnsafeUnpin for ComposeProj<P, Q>
where Q: UnsafeUnpin, P: UnsafeUnpin + ?Sized,

§

impl<P, Q> UnwindSafe for ComposeProj<P, Q>
where Q: UnwindSafe, P: UnwindSafe + ?Sized,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<P> ProjectionExt for P
where P: Projection + ?Sized,

Source§

unsafe fn borrow<'a, X, Y>(&self, ptr: *const X) -> Y
where X: HasPlace<Target = Self::Source> + PlaceBorrow<'a, Self, Y>, Y: HasPlace<Target = Self::Target>,

Convenience method that simply calls the corresponding PlaceBorrow method.
Source§

unsafe fn read<X>(&self, ptr: *const X) -> Self::Target
where X: PlaceRead<Self>, Self::Target: Sized,

Convenience method that simply calls the corresponding PlaceRead method.
Source§

unsafe fn write<X>(&self, ptr: *mut X, val: Self::Target)
where X: PlaceWrite<Self>, Self::Target: Sized,

Convenience method that simply calls the corresponding PlaceRead method.
Source§

unsafe fn deref<X>(&self, ptr: *mut X) -> *const Self::Target
where X: HasPlace<Target = Self::Source> + PlaceDeref<Self>, Self::Target: HasPlace,

Convenience method that simply calls the corresponding PlaceDeref method.
Source§

fn as_sized(&self) -> SizedProj<Self::Source, Self::Target>
where Self::Source: Sized, Self::Target: Sized,

When the target is sized, we know a projection is just an offset so we can make it sized even if we had a dyn Projection. Read more
Source§

fn compose<Q>(self, other: Q) -> ComposeProj<Self, Q>
where Self: Sized, Q: Projection<Source = Self::Target>,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.