[−][src]Struct gdnative_core::access::MaybeUnaligned
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]
G::Target: Copy,
Copies the data out of this access into a Vec
.
pub fn into_owned(self) -> Owned<G> where
G: WritePtr,
G::Target: Copy,
[src]
G: WritePtr,
G::Target: Copy,
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]
fn clone(&self) -> MaybeUnaligned<G>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn cmp(&self, other: &MaybeUnaligned<G>) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<G: PartialEq> PartialEq<MaybeUnaligned<G>> for MaybeUnaligned<G>
[src]
fn eq(&self, other: &MaybeUnaligned<G>) -> bool
[src]
fn ne(&self, other: &MaybeUnaligned<G>) -> bool
[src]
impl<G: PartialOrd> PartialOrd<MaybeUnaligned<G>> for MaybeUnaligned<G>
[src]
fn partial_cmp(&self, other: &MaybeUnaligned<G>) -> Option<Ordering>
[src]
fn lt(&self, other: &MaybeUnaligned<G>) -> bool
[src]
fn le(&self, other: &MaybeUnaligned<G>) -> bool
[src]
fn gt(&self, other: &MaybeUnaligned<G>) -> bool
[src]
fn ge(&self, other: &MaybeUnaligned<G>) -> bool
[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,
G: RefUnwindSafe,
impl<G> Send for MaybeUnaligned<G> where
G: Send,
G: Send,
impl<G> Sync for MaybeUnaligned<G> where
G: Sync,
G: Sync,
impl<G> Unpin for MaybeUnaligned<G> where
G: Unpin,
G: Unpin,
impl<G> UnwindSafe for MaybeUnaligned<G> where
G: UnwindSafe,
G: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,