Struct PropertyHintInfo
pub struct PropertyHintInfo {
pub hint: PropertyHint,
pub hint_string: GString,
}
Expand description
Info needed by Godot, for how to export a type to the editor.
Fields§
§hint: PropertyHint
§hint_string: GString
Implementations§
§impl PropertyHintInfo
impl PropertyHintInfo
pub fn none() -> PropertyHintInfo
pub fn none() -> PropertyHintInfo
Create a new PropertyHintInfo
with a property hint of PROPERTY_HINT_NONE
, and no hint string.
pub fn type_name<T>() -> PropertyHintInfowhere
T: GodotType,
pub fn type_name<T>() -> PropertyHintInfowhere
T: GodotType,
Use PROPERTY_HINT_NONE
with T
’s Godot type name.
Starting with Godot version 4.3, the hint string will always be the empty string. Before that, the hint string is set to
be the Godot type name of T
.
pub fn var_array_element<T>() -> PropertyHintInfowhere
T: ArrayElement,
pub fn var_array_element<T>() -> PropertyHintInfowhere
T: ArrayElement,
Use for #[var]
properties – PROPERTY_HINT_ARRAY_TYPE
with the type name as hint string.
pub fn export_array_element<T>() -> PropertyHintInfowhere
T: ArrayElement,
pub fn export_array_element<T>() -> PropertyHintInfowhere
T: ArrayElement,
Use for #[export]
properties – PROPERTY_HINT_TYPE_STRING
with the element type string as hint string.
pub fn export_packed_array_element<T>() -> PropertyHintInfowhere
T: PackedArrayElement,
pub fn export_packed_array_element<T>() -> PropertyHintInfowhere
T: PackedArrayElement,
Use for #[export]
properties – PROPERTY_HINT_TYPE_STRING
with the element type string as hint string.
Trait Implementations§
§impl Clone for PropertyHintInfo
impl Clone for PropertyHintInfo
§fn clone(&self) -> PropertyHintInfo
fn clone(&self) -> PropertyHintInfo
Returns a copy 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 more§impl Debug for PropertyHintInfo
impl Debug for PropertyHintInfo
§impl PartialEq for PropertyHintInfo
impl PartialEq for PropertyHintInfo
impl Eq for PropertyHintInfo
impl StructuralPartialEq for PropertyHintInfo
Auto Trait Implementations§
impl Freeze for PropertyHintInfo
impl RefUnwindSafe for PropertyHintInfo
impl !Send for PropertyHintInfo
impl !Sync for PropertyHintInfo
impl Unpin for PropertyHintInfo
impl UnwindSafe for PropertyHintInfo
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