pub struct ClibandServer {
pub state: Arc<AppState>,
}Expand description
Connection factory handed to russh::server::Server::run_on_socket.
Fields§
§state: Arc<AppState>Trait Implementations§
Source§impl Server for ClibandServer
impl Server for ClibandServer
Source§type Handler = SessionHandler
type Handler = SessionHandler
The type of handlers.
Source§fn new_client(&mut self, _peer: Option<SocketAddr>) -> SessionHandler
fn new_client(&mut self, _peer: Option<SocketAddr>) -> SessionHandler
Called when a new client connects.
Source§fn handle_session_error(&mut self, _error: <Self::Handler as Handler>::Error)
fn handle_session_error(&mut self, _error: <Self::Handler as Handler>::Error)
Called when an active connection fails.
Source§fn run_on_socket(
&mut self,
config: Arc<Config>,
socket: &TcpListener,
) -> RunningServer<impl Future<Output = Result<(), Error>> + Unpin + Send>where
Self: Send,
fn run_on_socket(
&mut self,
config: Arc<Config>,
socket: &TcpListener,
) -> RunningServer<impl Future<Output = Result<(), Error>> + Unpin + Send>where
Self: Send,
Run a server on a specified
tokio::net::TcpListener. Useful when dropping
privileges immediately after socket binding, for example.Auto Trait Implementations§
impl Freeze for ClibandServer
impl RefUnwindSafe for ClibandServer
impl Send for ClibandServer
impl Sync for ClibandServer
impl Unpin for ClibandServer
impl UnsafeUnpin for ClibandServer
impl UnwindSafe for ClibandServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more