[][src]Struct gdnative_core::access::MaybeUnaligned

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

An pool array access that may be unaligned.

Methods

impl<G: Guard> MaybeUnaligned<G>[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::Target> where
    G::Target: Copy
[src]

Copies the data out of this access into a Vec.

pub fn into_owned(self) -> Owned<G> where
    G: WritePtr,
    G::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> Clone for MaybeUnaligned<G>[src]

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

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

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

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

impl<G: PartialOrd> PartialOrd<MaybeUnaligned<G>> for MaybeUnaligned<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.