Trait sourceview5::prelude::SocketListenerExt
source · pub trait SocketListenerExt: IsA<SocketListener> + Sealed + 'static {
Show 16 methods
// Provided methods
fn accept(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(SocketConnection, Option<Object>), Error> { ... }
fn accept_async<P>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
where P: FnOnce(Result<(SocketConnection, Option<Object>), Error>) + 'static { ... }
fn accept_future(
&self,
) -> Pin<Box<dyn Future<Output = Result<(SocketConnection, Option<Object>), Error>>>> { ... }
fn accept_socket(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(Socket, Option<Object>), Error> { ... }
fn accept_socket_async<P>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
where P: FnOnce(Result<(Socket, Option<Object>), Error>) + 'static { ... }
fn accept_socket_future(
&self,
) -> Pin<Box<dyn Future<Output = Result<(Socket, Option<Object>), Error>>>> { ... }
fn add_address(
&self,
address: &impl IsA<SocketAddress>,
type_: SocketType,
protocol: SocketProtocol,
source_object: Option<&impl IsA<Object>>,
) -> Result<SocketAddress, Error> { ... }
fn add_any_inet_port(
&self,
source_object: Option<&impl IsA<Object>>,
) -> Result<u16, Error> { ... }
fn add_inet_port(
&self,
port: u16,
source_object: Option<&impl IsA<Object>>,
) -> Result<(), Error> { ... }
fn add_socket(
&self,
socket: &impl IsA<Socket>,
source_object: Option<&impl IsA<Object>>,
) -> Result<(), Error> { ... }
fn close(&self) { ... }
fn set_backlog(&self, listen_backlog: i32) { ... }
fn listen_backlog(&self) -> i32 { ... }
fn set_listen_backlog(&self, listen_backlog: i32) { ... }
fn connect_event<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self, SocketListenerEvent, &Socket) + 'static { ... }
fn connect_listen_backlog_notify<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self) + 'static { ... }
}
Provided Methods§
fn accept( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(SocketConnection, Option<Object>), Error>
fn accept_async<P>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn accept_future( &self, ) -> Pin<Box<dyn Future<Output = Result<(SocketConnection, Option<Object>), Error>>>>
fn accept_socket( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(Socket, Option<Object>), Error>
fn accept_socket_async<P>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn accept_socket_future( &self, ) -> Pin<Box<dyn Future<Output = Result<(Socket, Option<Object>), Error>>>>
fn add_address( &self, address: &impl IsA<SocketAddress>, type_: SocketType, protocol: SocketProtocol, source_object: Option<&impl IsA<Object>>, ) -> Result<SocketAddress, Error>
fn add_any_inet_port( &self, source_object: Option<&impl IsA<Object>>, ) -> Result<u16, Error>
fn add_inet_port( &self, port: u16, source_object: Option<&impl IsA<Object>>, ) -> Result<(), Error>
fn add_socket( &self, socket: &impl IsA<Socket>, source_object: Option<&impl IsA<Object>>, ) -> Result<(), Error>
fn close(&self)
fn set_backlog(&self, listen_backlog: i32)
fn listen_backlog(&self) -> i32
fn set_listen_backlog(&self, listen_backlog: i32)
fn connect_event<F>(&self, f: F) -> SignalHandlerId
fn connect_listen_backlog_notify<F>(&self, f: F) -> SignalHandlerId
Object Safety§
This trait is not object safe.