Trait SocketExt

Source
pub trait SocketExt: 'static {
Show 52 methods // Required methods fn accept<P: IsA<Cancellable>>( &self, cancellable: Option<&P>, ) -> Result<Socket, Error>; fn bind<P: IsA<SocketAddress>>( &self, address: &P, allow_reuse: bool, ) -> Result<(), Error>; fn check_connect_result(&self) -> Result<(), Error>; fn close(&self) -> Result<(), Error>; fn condition_check(&self, condition: IOCondition) -> IOCondition; fn condition_timed_wait<P: IsA<Cancellable>>( &self, condition: IOCondition, timeout: i64, cancellable: Option<&P>, ) -> Result<(), Error>; fn condition_wait<P: IsA<Cancellable>>( &self, condition: IOCondition, cancellable: Option<&P>, ) -> Result<(), Error>; fn connect<P: IsA<SocketAddress>, Q: IsA<Cancellable>>( &self, address: &P, cancellable: Option<&Q>, ) -> Result<(), Error>; fn connection_factory_create_connection(&self) -> Option<SocketConnection>; fn get_available_bytes(&self) -> isize; fn get_blocking(&self) -> bool; fn get_broadcast(&self) -> bool; fn get_credentials(&self) -> Result<Credentials, Error>; fn get_family(&self) -> SocketFamily; fn get_keepalive(&self) -> bool; fn get_listen_backlog(&self) -> i32; fn get_local_address(&self) -> Result<SocketAddress, Error>; fn get_multicast_loopback(&self) -> bool; fn get_multicast_ttl(&self) -> u32; fn get_option(&self, level: i32, optname: i32) -> Result<i32, Error>; fn get_protocol(&self) -> SocketProtocol; fn get_remote_address(&self) -> Result<SocketAddress, Error>; fn get_socket_type(&self) -> SocketType; fn get_timeout(&self) -> u32; fn get_ttl(&self) -> u32; fn is_closed(&self) -> bool; fn is_connected(&self) -> bool; fn join_multicast_group<P: IsA<InetAddress>>( &self, group: &P, source_specific: bool, iface: Option<&str>, ) -> Result<(), Error>; fn leave_multicast_group<P: IsA<InetAddress>>( &self, group: &P, source_specific: bool, iface: Option<&str>, ) -> Result<(), Error>; fn listen(&self) -> Result<(), Error>; fn set_blocking(&self, blocking: bool); fn set_broadcast(&self, broadcast: bool); fn set_keepalive(&self, keepalive: bool); fn set_listen_backlog(&self, backlog: i32); fn set_multicast_loopback(&self, loopback: bool); fn set_multicast_ttl(&self, ttl: u32); fn set_option( &self, level: i32, optname: i32, value: i32, ) -> Result<(), Error>; fn set_timeout(&self, timeout: u32); fn set_ttl(&self, ttl: u32); fn shutdown( &self, shutdown_read: bool, shutdown_write: bool, ) -> Result<(), Error>; fn speaks_ipv4(&self) -> bool; fn get_property_type(&self) -> SocketType; fn connect_property_blocking_notify<F: Fn(&Self) + Send + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_broadcast_notify<F: Fn(&Self) + Send + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_keepalive_notify<F: Fn(&Self) + Send + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_listen_backlog_notify<F: Fn(&Self) + Send + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_local_address_notify<F: Fn(&Self) + Send + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_multicast_loopback_notify<F: Fn(&Self) + Send + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_multicast_ttl_notify<F: Fn(&Self) + Send + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_remote_address_notify<F: Fn(&Self) + Send + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_timeout_notify<F: Fn(&Self) + Send + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_ttl_notify<F: Fn(&Self) + Send + 'static>( &self, f: F, ) -> SignalHandlerId;
}

Required Methods§

Source

fn accept<P: IsA<Cancellable>>( &self, cancellable: Option<&P>, ) -> Result<Socket, Error>

Source

fn bind<P: IsA<SocketAddress>>( &self, address: &P, allow_reuse: bool, ) -> Result<(), Error>

Source

fn check_connect_result(&self) -> Result<(), Error>

Source

fn close(&self) -> Result<(), Error>

Source

fn condition_check(&self, condition: IOCondition) -> IOCondition

Source

fn condition_timed_wait<P: IsA<Cancellable>>( &self, condition: IOCondition, timeout: i64, cancellable: Option<&P>, ) -> Result<(), Error>

Source

fn condition_wait<P: IsA<Cancellable>>( &self, condition: IOCondition, cancellable: Option<&P>, ) -> Result<(), Error>

Source

fn connect<P: IsA<SocketAddress>, Q: IsA<Cancellable>>( &self, address: &P, cancellable: Option<&Q>, ) -> Result<(), Error>

Source

fn connection_factory_create_connection(&self) -> Option<SocketConnection>

Source

fn get_available_bytes(&self) -> isize

Source

fn get_blocking(&self) -> bool

Source

fn get_broadcast(&self) -> bool

Source

fn get_credentials(&self) -> Result<Credentials, Error>

Source

fn get_family(&self) -> SocketFamily

Source

fn get_keepalive(&self) -> bool

Source

fn get_listen_backlog(&self) -> i32

Source

fn get_local_address(&self) -> Result<SocketAddress, Error>

Source

fn get_multicast_loopback(&self) -> bool

Source

fn get_multicast_ttl(&self) -> u32

Source

fn get_option(&self, level: i32, optname: i32) -> Result<i32, Error>

Source

fn get_protocol(&self) -> SocketProtocol

Source

fn get_remote_address(&self) -> Result<SocketAddress, Error>

Source

fn get_socket_type(&self) -> SocketType

Source

fn get_timeout(&self) -> u32

Source

fn get_ttl(&self) -> u32

Source

fn is_closed(&self) -> bool

Source

fn is_connected(&self) -> bool

Source

fn join_multicast_group<P: IsA<InetAddress>>( &self, group: &P, source_specific: bool, iface: Option<&str>, ) -> Result<(), Error>

Source

fn leave_multicast_group<P: IsA<InetAddress>>( &self, group: &P, source_specific: bool, iface: Option<&str>, ) -> Result<(), Error>

Source

fn listen(&self) -> Result<(), Error>

Source

fn set_blocking(&self, blocking: bool)

Source

fn set_broadcast(&self, broadcast: bool)

Source

fn set_keepalive(&self, keepalive: bool)

Source

fn set_listen_backlog(&self, backlog: i32)

Source

fn set_multicast_loopback(&self, loopback: bool)

Source

fn set_multicast_ttl(&self, ttl: u32)

Source

fn set_option(&self, level: i32, optname: i32, value: i32) -> Result<(), Error>

Source

fn set_timeout(&self, timeout: u32)

Source

fn set_ttl(&self, ttl: u32)

Source

fn shutdown( &self, shutdown_read: bool, shutdown_write: bool, ) -> Result<(), Error>

Source

fn speaks_ipv4(&self) -> bool

Source

fn get_property_type(&self) -> SocketType

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

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§

Source§

impl<O: IsA<Socket>> SocketExt for O