Struct RefArg
pub struct RefArg<'r, T> { /* private fields */ }
Implementations§
Trait Implementations§
§impl<'r, T> FromGodot for RefArg<'r, T>where
T: FromGodot,
impl<'r, T> FromGodot for RefArg<'r, T>where
T: FromGodot,
§fn try_from_godot(
_via: <RefArg<'r, T> as GodotConvert>::Via,
) -> Result<RefArg<'r, T>, ConvertError>
fn try_from_godot( _via: <RefArg<'r, T> as GodotConvert>::Via, ) -> Result<RefArg<'r, T>, ConvertError>
Converts the Godot representation to this type, returning
Err
on failure.§fn from_godot(via: Self::Via) -> Self
fn from_godot(via: Self::Via) -> Self
⚠️ Converts the Godot representation to this type. Read more
§fn try_from_variant(variant: &Variant) -> Result<Self, ConvertError>
fn try_from_variant(variant: &Variant) -> Result<Self, ConvertError>
Performs the conversion from a
Variant
, returning Err
on failure.§fn from_variant(variant: &Variant) -> Self
fn from_variant(variant: &Variant) -> Self
§impl<'r, T> GodotConvert for RefArg<'r, T>where
T: GodotConvert,
impl<'r, T> GodotConvert for RefArg<'r, T>where
T: GodotConvert,
§type Via = <T as GodotConvert>::Via
type Via = <T as GodotConvert>::Via
The type through which
Self
is represented in Godot.§impl<'r, T> ToGodot for RefArg<'r, T>where
T: ToGodot,
impl<'r, T> ToGodot for RefArg<'r, T>where
T: ToGodot,
§type ToVia<'v> = <T as ToGodot>::ToVia<'v>
where
RefArg<'r, T>: 'v
type ToVia<'v> = <T as ToGodot>::ToVia<'v> where RefArg<'r, T>: 'v
Target type of
to_godot()
, which differs from Via
for pass-by-reference types.§fn to_godot(&self) -> <RefArg<'r, T> as ToGodot>::ToVia<'_>
fn to_godot(&self) -> <RefArg<'r, T> as ToGodot>::ToVia<'_>
Converts this type to the Godot type by reference, usually by cloning.
§fn to_variant(&self) -> Variant
fn to_variant(&self) -> Variant
Converts this type to a Variant.
Auto Trait Implementations§
impl<'r, T> Freeze for RefArg<'r, T>
impl<'r, T> RefUnwindSafe for RefArg<'r, T>where
T: RefUnwindSafe,
impl<'r, T> Send for RefArg<'r, T>where
T: Sync,
impl<'r, T> Sync for RefArg<'r, T>where
T: Sync,
impl<'r, T> Unpin for RefArg<'r, T>
impl<'r, T> UnwindSafe for RefArg<'r, T>where
T: RefUnwindSafe,
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