[][src]Struct gdnative::api::IP_Unix

pub struct IP_Unix { /* fields omitted */ }

core class IP_Unix inherits IP (unsafe).

Official documentation

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

Class hierarchy

IP_Unix 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.

Methods from Deref<Target = IP>

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

Removes all of a [code]hostname[/code]'s cached references. If no [code]hostname[/code] is given, all cached IP addresses are removed.

Default Arguments

  • hostname - ""

pub fn erase_resolve_item(&self, id: i64)[src]

Removes a given item [code]id[/code] from the queue. This should be used to free a queue after it has completed to enable more queries to happen.

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

Returns all of the user's current IPv4 and IPv6 addresses as an array.

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

Returns all network adapters as an array.
				Each adapter is a dictionary of the form:
				[codeblock]
				{
				    "index": "1", # Interface index.
				    "name": "eth0", # Interface name.
				    "friendly": "Ethernet One", # A friendly name (might be empty).
				    "addresses": ["192.168.1.101"], # An array of IP addresses associated to this interface.
				}
				[/codeblock]

pub fn get_resolve_item_address(&self, id: i64) -> GodotString[src]

Returns a queued hostname's IP address, given its queue [code]id[/code]. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]).

pub fn get_resolve_item_status(&self, id: i64) -> ResolverStatus[src]

Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [code]id[/code].

pub fn resolve_hostname(
    &self,
    host: impl Into<GodotString>,
    ip_type: i64
) -> GodotString
[src]

Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [code]ip_type[/code].

Default Arguments

  • ip_type - 3

pub fn resolve_hostname_queue_item(
    &self,
    host: impl Into<GodotString>,
    ip_type: i64
) -> i64
[src]

Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error.

Default Arguments

  • ip_type - 3

Trait Implementations

impl Debug for IP_Unix[src]

impl Deref for IP_Unix[src]

type Target = IP

The resulting type after dereferencing.

impl DerefMut for IP_Unix[src]

impl GodotObject for IP_Unix[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 SubClass<IP> for IP_Unix[src]

impl SubClass<Object> for IP_Unix[src]

Auto Trait Implementations

impl RefUnwindSafe for IP_Unix

impl !Send for IP_Unix

impl !Sync for IP_Unix

impl Unpin for IP_Unix

impl UnwindSafe for IP_Unix

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.