[][src]Struct gdnative::prelude::Timer

pub struct Timer { /* fields omitted */ }

core class Timer inherits Node (unsafe).

Official documentation

See the documentation of this class in the Godot engine's official documentation.

Memory management

Non reference counted objects such as the ones of this type are usually owned by the engine.

Timer is a reference-only type. Persistent references can only exist in the unsafe Ref<Timer> form.

In the cases where Rust code owns an object of this type, for example if the object was just created on the Rust side and not passed to the engine yet, ownership should be either given to the engine or the object must be manually destroyed using Ptr::free, or Ptr::queue_free if it is a Node.

Class hierarchy

Timer inherits methods from:

Safety

All types in the Godot API have "interior mutability" in Rust parlance. To enforce that the official thread-safety guidelines are followed, the typestate pattern is used in the Ref and TRef smart pointers, and the Instance API. The typestate Access in these types tracks whether the access is unique, shared, or exclusive to the current thread. For more information, see the type-level documentation on Ref.

Implementations

impl Timer[src]

Constants

impl Timer[src]

pub fn new() -> Ref<Timer, Unique>[src]

Creates a new instance of this object.

Because this type is not reference counted, the lifetime of the returned object is not automatically managed.

Immediately after creation, the object is owned by the caller, and can be passed to the engine (in which case the engine will be responsible for destroying the object) or destroyed manually using Ptr::free, or preferably Ptr::queue_free if it is a Node.

pub fn time_left(&self) -> f64[src]

pub fn timer_process_mode(&self) -> TimerProcessMode[src]

pub fn wait_time(&self) -> f64[src]

pub fn has_autostart(&self) -> bool[src]

pub fn is_one_shot(&self) -> bool[src]

pub fn is_paused(&self) -> bool[src]

pub fn is_stopped(&self) -> bool[src]

pub fn set_autostart(&self, enable: bool)[src]

pub fn set_one_shot(&self, enable: bool)[src]

pub fn set_paused(&self, paused: bool)[src]

pub fn set_timer_process_mode(&self, mode: i64)[src]

pub fn set_wait_time(&self, time_sec: f64)[src]

pub fn start(&self, time_sec: f64)[src]

pub fn stop(&self)[src]

Methods from Deref<Target = Node>

pub const DUPLICATE_GROUPS: i64[src]

pub const DUPLICATE_SCRIPTS: i64[src]

pub const DUPLICATE_SIGNALS: i64[src]

pub const DUPLICATE_USE_INSTANCING: i64[src]

pub const NOTIFICATION_APP_PAUSED: i64[src]

pub const NOTIFICATION_APP_RESUMED: i64[src]

pub const NOTIFICATION_CRASH: i64[src]

pub const NOTIFICATION_DRAG_BEGIN: i64[src]

pub const NOTIFICATION_DRAG_END: i64[src]

pub const NOTIFICATION_ENTER_TREE: i64[src]

pub const NOTIFICATION_EXIT_TREE: i64[src]

pub const NOTIFICATION_INSTANCED: i64[src]

pub const NOTIFICATION_INTERNAL_PHYSICS_PROCESS: i64[src]

pub const NOTIFICATION_INTERNAL_PROCESS: i64[src]

pub const NOTIFICATION_MOVED_IN_PARENT: i64[src]

pub const NOTIFICATION_OS_IME_UPDATE: i64[src]

pub const NOTIFICATION_OS_MEMORY_WARNING: i64[src]

pub const NOTIFICATION_PARENTED: i64[src]

pub const NOTIFICATION_PATH_CHANGED: i64[src]

pub const NOTIFICATION_PAUSED: i64[src]

pub const NOTIFICATION_PHYSICS_PROCESS: i64[src]

pub const NOTIFICATION_PROCESS: i64[src]

pub const NOTIFICATION_READY: i64[src]

pub const NOTIFICATION_TRANSLATION_CHANGED: i64[src]

pub const NOTIFICATION_UNPARENTED: i64[src]

pub const NOTIFICATION_UNPAUSED: i64[src]

pub const NOTIFICATION_WM_ABOUT: i64[src]

pub const NOTIFICATION_WM_FOCUS_IN: i64[src]

pub const NOTIFICATION_WM_FOCUS_OUT: i64[src]

pub const NOTIFICATION_WM_GO_BACK_REQUEST: i64[src]

pub const NOTIFICATION_WM_MOUSE_ENTER: i64[src]

pub const NOTIFICATION_WM_MOUSE_EXIT: i64[src]

pub const NOTIFICATION_WM_QUIT_REQUEST: i64[src]

pub const NOTIFICATION_WM_UNFOCUS_REQUEST: i64[src]

pub const PAUSE_MODE_INHERIT: i64[src]

pub const PAUSE_MODE_PROCESS: i64[src]

pub const PAUSE_MODE_STOP: i64[src]

pub fn add_child(&self, node: impl AsArg<Node>, legible_unique_name: bool)[src]

pub fn add_child_below_node(
    &self,
    node: impl AsArg<Node>,
    child_node: impl AsArg<Node>,
    legible_unique_name: bool
)
[src]

pub fn add_to_group(&self, group: impl Into<GodotString>, persistent: bool)[src]

pub fn can_process(&self) -> bool[src]

pub fn duplicate(&self, flags: i64) -> Option<Ref<Node, Shared>>[src]

pub fn find_node(
    &self,
    mask: impl Into<GodotString>,
    recursive: bool,
    owned: bool
) -> Option<Ref<Node, Shared>>
[src]

pub fn find_parent(
    &self,
    mask: impl Into<GodotString>
) -> Option<Ref<Node, Shared>>
[src]

pub fn get_child(&self, idx: i64) -> Option<Ref<Node, Shared>>[src]

pub fn get_child_count(&self) -> i64[src]

pub fn get_children(&self) -> VariantArray<Shared>[src]

pub fn custom_multiplayer(&self) -> Option<Ref<MultiplayerAPI, Shared>>[src]

pub fn filename(&self) -> GodotString[src]

pub fn get_groups(&self) -> VariantArray<Shared>[src]

pub fn get_index(&self) -> i64[src]

pub fn multiplayer(&self) -> Option<Ref<MultiplayerAPI, Shared>>[src]

pub fn name(&self) -> GodotString[src]

pub fn get_network_master(&self) -> i64[src]

pub fn get_node(&self, path: impl Into<NodePath>) -> Option<Ref<Node, Shared>>[src]

pub fn get_node_and_resource(
    &self,
    path: impl Into<NodePath>
) -> VariantArray<Shared>
[src]

pub fn get_node_or_null(
    &self,
    path: impl Into<NodePath>
) -> Option<Ref<Node, Shared>>
[src]

pub fn owner(&self) -> Option<Ref<Node, Shared>>[src]

pub fn get_parent(&self) -> Option<Ref<Node, Shared>>[src]

pub fn get_path(&self) -> NodePath[src]

pub fn get_path_to(&self, node: impl AsArg<Node>) -> NodePath[src]

pub fn pause_mode(&self) -> PauseMode[src]

pub fn get_physics_process_delta_time(&self) -> f64[src]

pub fn get_position_in_parent(&self) -> i64[src]

pub fn get_process_delta_time(&self) -> f64[src]

pub fn process_priority(&self) -> i64[src]

pub fn get_scene_instance_load_placeholder(&self) -> bool[src]

pub fn get_tree(&self) -> Option<Ref<SceneTree, Shared>>[src]

pub fn get_viewport(&self) -> Option<Ref<Viewport, Shared>>[src]

pub fn has_node(&self, path: impl Into<NodePath>) -> bool[src]

pub fn has_node_and_resource(&self, path: impl Into<NodePath>) -> bool[src]

pub fn is_a_parent_of(&self, node: impl AsArg<Node>) -> bool[src]

pub fn is_displayed_folded(&self) -> bool[src]

pub fn is_greater_than(&self, node: impl AsArg<Node>) -> bool[src]

pub fn is_in_group(&self, group: impl Into<GodotString>) -> bool[src]

pub fn is_inside_tree(&self) -> bool[src]

pub fn is_network_master(&self) -> bool[src]

pub fn is_physics_processing(&self) -> bool[src]

pub fn is_physics_processing_internal(&self) -> bool[src]

pub fn is_processing(&self) -> bool[src]

pub fn is_processing_input(&self) -> bool[src]

pub fn is_processing_internal(&self) -> bool[src]

pub fn is_processing_unhandled_input(&self) -> bool[src]

pub fn is_processing_unhandled_key_input(&self) -> bool[src]

pub fn move_child(&self, child_node: impl AsArg<Node>, to_position: i64)[src]

pub fn print_stray_nodes(&self)[src]

pub fn print_tree(&self)[src]

pub fn print_tree_pretty(&self)[src]

pub fn propagate_call(
    &self,
    method: impl Into<GodotString>,
    args: VariantArray<Shared>,
    parent_first: bool
)
[src]

pub fn propagate_notification(&self, what: i64)[src]

pub fn queue_free(&self)[src]

pub fn raise(&self)[src]

pub fn remove_and_skip(&self)[src]

pub fn remove_child(&self, node: impl AsArg<Node>)[src]

pub fn remove_from_group(&self, group: impl Into<GodotString>)[src]

pub fn replace_by(&self, node: impl AsArg<Node>, keep_data: bool)[src]

pub fn request_ready(&self)[src]

pub fn rpc(
    &self,
    method: impl Into<GodotString>,
    varargs: &[Variant]
) -> Variant
[src]

pub fn rpc_config(&self, method: impl Into<GodotString>, mode: i64)[src]

pub fn rpc_id(
    &self,
    peer_id: i64,
    method: impl Into<GodotString>,
    varargs: &[Variant]
) -> Variant
[src]

pub fn rpc_unreliable(
    &self,
    method: impl Into<GodotString>,
    varargs: &[Variant]
) -> Variant
[src]

pub fn rpc_unreliable_id(
    &self,
    peer_id: i64,
    method: impl Into<GodotString>,
    varargs: &[Variant]
) -> Variant
[src]

pub fn rset(&self, property: impl Into<GodotString>, value: impl OwnedToVariant)[src]

pub fn rset_config(&self, property: impl Into<GodotString>, mode: i64)[src]

pub fn rset_id(
    &self,
    peer_id: i64,
    property: impl Into<GodotString>,
    value: impl OwnedToVariant
)
[src]

pub fn rset_unreliable(
    &self,
    property: impl Into<GodotString>,
    value: impl OwnedToVariant
)
[src]

pub fn rset_unreliable_id(
    &self,
    peer_id: i64,
    property: impl Into<GodotString>,
    value: impl OwnedToVariant
)
[src]

pub fn set_custom_multiplayer(&self, api: impl AsArg<MultiplayerAPI>)[src]

pub fn set_display_folded(&self, fold: bool)[src]

pub fn set_filename(&self, filename: impl Into<GodotString>)[src]

pub fn set_name(&self, name: impl Into<GodotString>)[src]

pub fn set_network_master(&self, id: i64, recursive: bool)[src]

pub fn set_owner(&self, owner: impl AsArg<Node>)[src]

pub fn set_pause_mode(&self, mode: i64)[src]

pub fn set_physics_process(&self, enable: bool)[src]

pub fn set_physics_process_internal(&self, enable: bool)[src]

pub fn set_process(&self, enable: bool)[src]

pub fn set_process_input(&self, enable: bool)[src]

pub fn set_process_internal(&self, enable: bool)[src]

pub fn set_process_priority(&self, priority: i64)[src]

pub fn set_process_unhandled_input(&self, enable: bool)[src]

pub fn set_process_unhandled_key_input(&self, enable: bool)[src]

pub fn set_scene_instance_load_placeholder(&self, load_placeholder: bool)[src]

pub fn update_configuration_warning(&self)[src]

Trait Implementations

impl Debug for Timer[src]

impl Deref for Timer[src]

type Target = Node

The resulting type after dereferencing.

impl DerefMut for Timer[src]

impl GodotObject for Timer[src]

type RefKind = ManuallyManaged

The memory management kind of this type. This modifies the behavior of the Ref smart pointer. See its type-level documentation for more information. Read more

impl Instanciable for Timer[src]

impl QueueFree for Timer[src]

impl SubClass<Node> for Timer[src]

impl SubClass<Object> for Timer[src]

Auto Trait Implementations

impl RefUnwindSafe for Timer

impl !Send for Timer

impl !Sync for Timer

impl Unpin for Timer

impl UnwindSafe for Timer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SubClass<T> for T where
    T: GodotObject
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.