pub struct Setup<S, NA> { /* private fields */ }Expand description
A intermediate structure that implements NewActor, creating
TcpServer.
See TcpServer::setup to create this and TcpServer for examples.
Implementations
sourceimpl<S, NA> Setup<S, NA>
impl<S, NA> Setup<S, NA>
sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
Returns the address the server is bound to.
Trait Implementations
sourceimpl<S, NA> NewActor for Setup<S, NA> where
S: Supervisor<NA> + Clone + 'static,
NA: NewActor<Argument = (TcpStream, SocketAddr)> + Clone + 'static,
NA::RuntimeAccess: Access + Spawn<S, NA, NA::RuntimeAccess>,
impl<S, NA> NewActor for Setup<S, NA> where
S: Supervisor<NA> + Clone + 'static,
NA: NewActor<Argument = (TcpStream, SocketAddr)> + Clone + 'static,
NA::RuntimeAccess: Access + Spawn<S, NA, NA::RuntimeAccess>,
type RuntimeAccess = <NA as NewActor>::RuntimeAccess
type RuntimeAccess = <NA as NewActor>::RuntimeAccess
The kind of runtime access needed by the actor. Read more
sourcefn new(
&mut self,
ctx: Context<Self::Message, Self::RuntimeAccess>,
_: Self::Argument
) -> Result<Self::Actor, Self::Error>
fn new(
&mut self,
ctx: Context<Self::Message, Self::RuntimeAccess>,
_: Self::Argument
) -> Result<Self::Actor, Self::Error>
Create a new Actor.
Auto Trait Implementations
impl<S, NA> RefUnwindSafe for Setup<S, NA> where
NA: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, NA> Send for Setup<S, NA> where
NA: Send + Sync,
S: Send + Sync,
impl<S, NA> Sync for Setup<S, NA> where
NA: Send + Sync,
S: Send + Sync,
impl<S, NA> Unpin for Setup<S, NA>
impl<S, NA> UnwindSafe for Setup<S, NA> where
NA: RefUnwindSafe,
S: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more