pub struct DynTraitImpl { /* private fields */ }
Expand description
Representation of a #[godot_dyn]
invocation.
Stores all the information needed for DynGd
re-enrichment.
Implementations§
Source§impl DynTraitImpl
impl DynTraitImpl
pub fn new<T, D>() -> Self
Sourcepub fn class_name(&self) -> &ClassName
pub fn class_name(&self) -> &ClassName
The class that this dyn Trait
implementation corresponds to.
Sourcepub fn dyn_trait_typeid(&self) -> TypeId
pub fn dyn_trait_typeid(&self) -> TypeId
The type id of the trait object this was registered with.
Sourcepub fn get_dyn_gd<T: GodotClass, D: ?Sized + 'static>(
&self,
object: Gd<T>,
) -> Result<DynGd<T, D>, Gd<T>>
pub fn get_dyn_gd<T: GodotClass, D: ?Sized + 'static>( &self, object: Gd<T>, ) -> Result<DynGd<T, D>, Gd<T>>
Convert a Gd<T>
to a DynGd<T, D>
using self
.
This will fail with Err(object)
if the dynamic class of object
does not match the ClassName
stored in self
.
Trait Implementations§
Source§impl Clone for DynTraitImpl
impl Clone for DynTraitImpl
Source§fn clone(&self) -> DynTraitImpl
fn clone(&self) -> DynTraitImpl
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for DynTraitImpl
impl RefUnwindSafe for DynTraitImpl
impl Send for DynTraitImpl
impl Sync for DynTraitImpl
impl Unpin for DynTraitImpl
impl UnwindSafe for DynTraitImpl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more