SocketAddressExt

Trait SocketAddressExt 

Source
pub trait SocketAddressExt: IsA<SocketAddress> + 'static {
    // Provided methods
    fn family(&self) -> SocketFamily { ... }
    fn native_size(&self) -> isize { ... }
    fn connect_family_notify<F>(&self, f: F) -> SignalHandlerId
       where F: Fn(&Self) + Send + Sync + 'static { ... }
}
Expand description

Provided Methods§

Source

fn family(&self) -> SocketFamily

Gets the socket family type of @self.

§Returns

the socket family type of @self

Source

fn native_size(&self) -> isize

Gets the size of @self’s native struct sockaddr. You can use this to allocate memory to pass to g_socket_address_to_native().

§Returns

the size of the native struct sockaddr that @self represents, or -1 if @self is not valid

Source

fn connect_family_notify<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self) + Send + Sync + 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§