Struct samotop::server::SamotopBuilder
source · pub struct SamotopBuilder<S> { /* private fields */ }
Implementations
sourceimpl<S> SamotopBuilder<S>
impl<S> SamotopBuilder<S>
pub fn new(default_port: impl ToString, service: S) -> Self
pub fn with<SX>(self, service: SX) -> SamotopBuilder<SX>
pub fn on(self, port: impl ToString) -> Selfwhere
S: Clone,
pub fn on_all<P>(self, ports: impl IntoIterator<Item = P>) -> Selfwhere
P: ToString,
S: Clone,
pub fn into_servers(self) -> impl Iterator<Item = SamotopServer<S>>where
S: Clone,
pub fn build_task<Fut>(self) -> impl Future<Item = (), Error = ()>where
S: TcpService<Future = Fut> + Clone + Send + 'static,
Fut: Future<Item = (), Error = ()> + Send + 'static,
Trait Implementations
sourceimpl<S: Clone> Clone for SamotopBuilder<S>
impl<S: Clone> Clone for SamotopBuilder<S>
sourcefn clone(&self) -> SamotopBuilder<S>
fn clone(&self) -> SamotopBuilder<S>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl<S> RefUnwindSafe for SamotopBuilder<S>where
S: RefUnwindSafe,
impl<S> Send for SamotopBuilder<S>where
S: Send,
impl<S> Sync for SamotopBuilder<S>where
S: Sync,
impl<S> Unpin for SamotopBuilder<S>where
S: Unpin,
impl<S> UnwindSafe for SamotopBuilder<S>where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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