Trait gio::prelude::SocketAddressExt

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

Trait containing all SocketAddress methods.

§Implementors

InetSocketAddress, SocketAddress, UnixSocketAddress

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

source

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

Object Safety§

This trait is not object safe.

Implementors§