[−][src]Struct gdnative::api::IP_Unix
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 const RESOLVER_INVALID_ID: i64
[src]
pub const RESOLVER_MAX_QUERIES: i64
[src]
pub const RESOLVER_STATUS_DONE: i64
[src]
pub const RESOLVER_STATUS_ERROR: i64
[src]
pub const RESOLVER_STATUS_NONE: i64
[src]
pub const RESOLVER_STATUS_WAITING: i64
[src]
pub const TYPE_ANY: i64
[src]
pub const TYPE_IPV4: i64
[src]
pub const TYPE_IPV6: i64
[src]
pub const TYPE_NONE: i64
[src]
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]
&self,
host: impl Into<GodotString>,
ip_type: i64
) -> GodotString
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]
&self,
host: impl Into<GodotString>,
ip_type: i64
) -> i64
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]
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
fn class_name() -> &'static str
[src]
fn null() -> Null<Self>
[src]
fn new() -> Ref<Self, Unique> where
Self: Instanciable,
[src]
Self: Instanciable,
fn cast<T>(&self) -> Option<&T> where
T: GodotObject + SubClass<Self>,
[src]
T: GodotObject + SubClass<Self>,
fn upcast<T>(&self) -> &T where
Self: SubClass<T>,
T: GodotObject,
[src]
Self: SubClass<T>,
T: GodotObject,
unsafe fn assume_shared(&self) -> Ref<Self, Shared>
[src]
unsafe fn assume_thread_local(&self) -> Ref<Self, ThreadLocal> where
Self: GodotObject<RefKind = RefCounted>,
[src]
Self: GodotObject<RefKind = RefCounted>,
unsafe fn assume_unique(&self) -> Ref<Self, Unique>
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SubClass<T> for T where
T: GodotObject,
[src]
T: GodotObject,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,