pub struct TelnetServer { /* private fields */ }Expand description
Telnet 管理服务
Implementations§
Source§impl TelnetServer
impl TelnetServer
pub fn new( listen_addr: String, connections: Arc<DashMap<u64, ClientConn>>, subscriptions: Option<Arc<SubscriptionManager>>, metrics: Option<Arc<GatewayMetrics>>, shutdown_tx: Sender<bool>, ) -> Self
Sourcepub fn with_relogin_fn(self, relogin_fn: ReloginFn) -> Self
pub fn with_relogin_fn(self, relogin_fn: ReloginFn) -> Self
v1.4.97 P1-D-F: builder-style setter for relogin callback.
pub async fn run(&self) -> Result<()>
pub async fn run_until_shutdown( &self, shutdown_rx: Receiver<bool>, ) -> Result<()>
Sourcepub async fn run_until_shutdown_with_listener_events(
&self,
shutdown_rx: Receiver<bool>,
listener_events: Option<ListenerBindEventSender>,
) -> Result<()>
pub async fn run_until_shutdown_with_listener_events( &self, shutdown_rx: Receiver<bool>, listener_events: Option<ListenerBindEventSender>, ) -> Result<()>
Run until shutdown and report the exact socket bind result to startup.
Auto Trait Implementations§
impl !RefUnwindSafe for TelnetServer
impl !UnwindSafe for TelnetServer
impl Freeze for TelnetServer
impl Send for TelnetServer
impl Sync for TelnetServer
impl Unpin for TelnetServer
impl UnsafeUnpin for TelnetServer
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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