pub struct Aether<T> { /* private fields */ }
Expand description
Special user-data wrapper intended for zero-sized types, that does not perform any
allocation or synchronization at runtime. Does not implement MapMut
.
Aether
produces a value using Default
each time it’s mapped. This is most useful when
used with auto-load scripts to simulate static functions, since actual static functions
can’t be exported in GDNative.
Trait Implementations
sourceimpl<T> Map for Aether<T> where
T: NativeClass + Copy + Default,
impl<T> Map for Aether<T> where
T: NativeClass + Copy + Default,
type Err = Infallible
sourceimpl<T> UserData for Aether<T> where
T: NativeClass + Copy + Default,
impl<T> UserData for Aether<T> where
T: NativeClass + Copy + Default,
type Target = T
sourcefn new(_val: Self::Target) -> Self
fn new(_val: Self::Target) -> Self
Creates a new owned wrapper from a NativeClass
instance. Read more
sourcefn into_user_data(self) -> *const c_void
fn into_user_data(self) -> *const c_void
Takes a native instance and returns an opaque pointer that can be used to recover it. Read more
sourceunsafe fn consume_user_data_unchecked(_ptr: *const c_void) -> Self
unsafe fn consume_user_data_unchecked(_ptr: *const c_void) -> Self
Takes an opaque pointer produced by into_user_data
and “consumes” it to produce the
original instance, keeping the reference count. Read more
sourceunsafe fn clone_from_user_data_unchecked(_ptr: *const c_void) -> Self
unsafe fn clone_from_user_data_unchecked(_ptr: *const c_void) -> Self
Takes an opaque pointer produced by into_user_data
and “clones” it to produce the
original instance, increasing the reference count. Read more
impl<T: Copy> Copy for Aether<T>
impl<T> Send for Aether<T>
impl<T> Sync for Aether<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Aether<T> where
T: RefUnwindSafe,
impl<T> Unpin for Aether<T> where
T: Unpin,
impl<T> UnwindSafe for Aether<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more