[][src]Struct gdnative::access::MaybeUnaligned

pub struct MaybeUnaligned<G> { /* fields omitted */ }

An pool array access that may be unaligned.

Methods

impl<G> MaybeUnaligned<G> where
    G: Guard, 
[src]

pub unsafe fn assume_aligned(self) -> Aligned<G>[src]

Assumes that an access is aligned. It is undefined behavior to Deref the resulting access if the underlying pointer is not aligned to G::Target.

pub fn try_into_aligned(self) -> Option<Aligned<G>>[src]

Tries to convert to an aligned access. Returns None if the underlying pointer is not aligned.

pub fn to_vec(&self) -> Vec<<G as Guard>::Target> where
    <G as Guard>::Target: Copy
[src]

Copies the data out of this access into a Vec.

pub fn into_owned(self) -> Owned<G> where
    G: WritePtr,
    <G as Guard>::Target: Copy
[src]

Converts to an access backed by an owned, aligned copy of the data. The data is written back when the access is dropped.

Trait Implementations

impl<G> Clone for MaybeUnaligned<G> where
    G: Clone
[src]

impl<G> Debug for MaybeUnaligned<G> where
    G: Debug
[src]

impl<G> Eq for MaybeUnaligned<G> where
    G: Eq
[src]

impl<G> Ord for MaybeUnaligned<G> where
    G: Ord
[src]

impl<G> PartialEq<MaybeUnaligned<G>> for MaybeUnaligned<G> where
    G: PartialEq<G>, 
[src]

impl<G> PartialOrd<MaybeUnaligned<G>> for MaybeUnaligned<G> where
    G: PartialOrd<G>, 
[src]

impl<G> StructuralEq for MaybeUnaligned<G>[src]

impl<G> StructuralPartialEq for MaybeUnaligned<G>[src]

Auto Trait Implementations

impl<G> RefUnwindSafe for MaybeUnaligned<G> where
    G: RefUnwindSafe

impl<G> Send for MaybeUnaligned<G> where
    G: Send

impl<G> Sync for MaybeUnaligned<G> where
    G: Sync

impl<G> Unpin for MaybeUnaligned<G> where
    G: Unpin

impl<G> UnwindSafe for MaybeUnaligned<G> where
    G: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.