godot::meta

Struct RefArg

pub struct RefArg<'r, T> { /* private fields */ }

Implementations§

§

impl<'r, T> RefArg<'r, T>

pub fn new(shared_ref: &'r T) -> RefArg<'r, T>

Trait Implementations§

§

impl<'r, T> Debug for RefArg<'r, T>
where T: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

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>

Converts the Godot representation to this type, returning Err on failure.
§

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>

Performs the conversion from a Variant, returning Err on failure.
§

fn from_variant(variant: &Variant) -> Self

⚠️ Performs the conversion from a Variant. Read more
§

impl<'r, T> GodotConvert for RefArg<'r, T>
where T: GodotConvert,

§

type Via = <T as GodotConvert>::Via

The type through which Self is represented in Godot.
§

impl<'r, T> GodotNullableFfi for RefArg<'r, T>
where T: GodotNullableFfi,

§

fn null() -> RefArg<'r, T>

§

fn is_null(&self) -> bool

§

fn flatten_option(opt: Option<Self>) -> Self

§

impl<'r, T> ToGodot for RefArg<'r, T>
where T: ToGodot,

§

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<'_>

Converts this type to the Godot type by reference, usually by cloning.
§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.