Struct ntex::server::ServiceConfig [−][src]
pub struct ServiceConfig { /* fields omitted */ }
Implementations
impl ServiceConfig
[src]
impl ServiceConfig
[src]pub fn bind<U, N: AsRef<str>>(&mut self, name: N, addr: U) -> Result<&mut Self> where
U: ToSocketAddrs,
[src]
pub fn bind<U, N: AsRef<str>>(&mut self, name: N, addr: U) -> Result<&mut Self> where
U: ToSocketAddrs,
[src]Add new service to the server.
pub fn listen<N: AsRef<str>>(&mut self, name: N, lst: TcpListener) -> &mut Self
[src]
pub fn listen<N: AsRef<str>>(&mut self, name: N, lst: TcpListener) -> &mut Self
[src]Add new service to the server.
pub fn apply<F>(&mut self, f: F) -> Result<()> where
F: Fn(&mut ServiceRuntime) + Send + Clone + 'static,
[src]
pub fn apply<F>(&mut self, f: F) -> Result<()> where
F: Fn(&mut ServiceRuntime) + Send + Clone + 'static,
[src]Register service configuration function.
This function get called during worker runtime configuration. It get executed in the worker thread.
pub fn apply_async<F, R, E>(&mut self, f: F) -> Result<()> where
F: Fn(ServiceRuntime) -> R + Send + Clone + 'static,
R: Future<Output = Result<(), E>> + 'static,
E: Display + 'static,
[src]
pub fn apply_async<F, R, E>(&mut self, f: F) -> Result<()> where
F: Fn(ServiceRuntime) -> R + Send + Clone + 'static,
R: Future<Output = Result<(), E>> + 'static,
E: Display + 'static,
[src]Register async service configuration function.
This function get called during worker runtime configuration. It get executed in the worker thread.
Auto Trait Implementations
impl !RefUnwindSafe for ServiceConfig
impl Send for ServiceConfig
impl !Sync for ServiceConfig
impl Unpin for ServiceConfig
impl !UnwindSafe for ServiceConfig
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self