pub struct NodePath { /* private fields */ }
Expand description
A pre-parsed scene tree path.
§Null bytes
Note that Godot ignores any bytes after a null-byte. This means that for instance "hello, world!"
and "hello, world!\0 ignored by Godot"
will be treated as the same string if converted to a NodePath
.
Implementations§
Trait Implementations§
§impl Export for NodePath
impl Export for NodePath
§fn default_export_info() -> PropertyHintInfo
fn default_export_info() -> PropertyHintInfo
The export info to use for an exported field of this type, if no other export info is specified.
§impl From<&NodePath> for StringName
impl From<&NodePath> for StringName
§fn from(path: &NodePath) -> StringName
fn from(path: &NodePath) -> StringName
Converts to this type from the input type.
§impl From<&StringName> for NodePath
impl From<&StringName> for NodePath
§fn from(string_name: &StringName) -> NodePath
fn from(string_name: &StringName) -> NodePath
Converts to this type from the input type.
§impl From<NodePath> for StringName
impl From<NodePath> for StringName
§fn from(path: NodePath) -> StringName
fn from(path: NodePath) -> StringName
Converts this NodePath
to a StringName
.
This is identical to StringName::from(&path)
, and as such there is no performance benefit.
§impl From<StringName> for NodePath
impl From<StringName> for NodePath
§fn from(string_name: StringName) -> NodePath
fn from(string_name: StringName) -> NodePath
Converts this StringName
to a NodePath
.
This is identical to NodePath::from(&string_name)
, and as such there is no performance benefit.
§impl FromGodot for NodePath
impl FromGodot for NodePath
§fn try_from_godot(
via: <NodePath as GodotConvert>::Via,
) -> Result<NodePath, ConvertError>
fn try_from_godot( via: <NodePath as GodotConvert>::Via, ) -> Result<NodePath, 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 GodotConvert for NodePath
impl GodotConvert for NodePath
§impl ToGodot for NodePath
impl ToGodot for NodePath
§fn to_godot(&self) -> <NodePath as GodotConvert>::Via
fn to_godot(&self) -> <NodePath as GodotConvert>::Via
Converts this type to the Godot type by reference, usually by cloning.
§fn into_godot(self) -> <NodePath as GodotConvert>::Via
fn into_godot(self) -> <NodePath as GodotConvert>::Via
Converts this type to the Godot type. Read more
§fn to_variant(&self) -> Variant
fn to_variant(&self) -> Variant
Converts this type to a Variant.
§impl TypeStringHint for NodePath
impl TypeStringHint for NodePath
§fn type_string() -> String
fn type_string() -> String
Returns the representation of this type as a type string. Read more
§impl Var for NodePath
impl Var for NodePath
fn get_property(&self) -> <NodePath as GodotConvert>::Via
fn set_property(&mut self, value: <NodePath as GodotConvert>::Via)
fn property_hint() -> PropertyHintInfo
impl ArrayElement for NodePath
impl Eq for NodePath
impl GodotType for NodePath
Auto Trait Implementations§
impl Freeze for NodePath
impl RefUnwindSafe for NodePath
impl !Send for NodePath
impl !Sync for NodePath
impl Unpin for NodePath
impl UnwindSafe for NodePath
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)