Trait distant_net::server::ServerRef
source · pub trait ServerRef: AsAny + Send {
fn is_finished(&self) -> bool;
fn abort(&self);
fn wait(self) -> Pin<Box<dyn Future<Output = Result<()>>>>
where
Self: Sized + 'static,
{ ... }
}Expand description
Interface to engage with a server instance
Required Methods
sourcefn is_finished(&self) -> bool
fn is_finished(&self) -> bool
Returns true if the server is no longer running
Provided Methods
Implementations
sourceimpl dyn ServerRef
impl dyn ServerRef
sourcepub fn as_server_ref<R: ServerRef>(&self) -> Option<&R>
pub fn as_server_ref<R: ServerRef>(&self) -> Option<&R>
Attempts to convert this ref into a concrete ref by downcasting
sourcepub fn as_mut_server_ref<R: ServerRef>(&mut self) -> Option<&mut R>
pub fn as_mut_server_ref<R: ServerRef>(&mut self) -> Option<&mut R>
Attempts to convert this mutable ref into a concrete mutable ref by downcasting
sourcepub fn into_boxed_server_ref<R: ServerRef>(
self: Box<Self>
) -> Result<Box<R>, Box<dyn Any>>
pub fn into_boxed_server_ref<R: ServerRef>(
self: Box<Self>
) -> Result<Box<R>, Box<dyn Any>>
Attempts to convert this into a concrete, boxed ref by downcasting
sourcepub async fn polling_wait(&self) -> Result<()>
pub async fn polling_wait(&self) -> Result<()>
Waits for the server to complete by continuously polling the finished state.
Implementors
impl ServerRef for GenericServerRef
Runtime-specific implementation of ServerRef for a tokio::task::JoinHandle