[−][src]Struct ntex_amqp::server::Server
Server dispatcher factory
Implementations
impl<Io, St, H> Server<Io, St, H, DefaultControlService<St, H::Error>> where
St: 'static,
Io: AsyncRead + AsyncWrite + Unpin + 'static,
H: ServiceFactory<Config = (), Request = Handshake<Io>, Response = HandshakeAck<Io, St>> + 'static,
H::Error: Debug,
[src]
St: 'static,
Io: AsyncRead + AsyncWrite + Unpin + 'static,
H: ServiceFactory<Config = (), Request = Handshake<Io>, Response = HandshakeAck<Io, St>> + 'static,
H::Error: Debug,
pub fn new<F>(handshake: F) -> Self where
F: IntoServiceFactory<H>,
[src]
F: IntoServiceFactory<H>,
Create server factory and provide handshake service
impl<Io, St, H, Ctl> Server<Io, St, H, Ctl>
[src]
pub fn config(mut self: Self, config: Configuration) -> Self
[src]
Provide connection configuration
pub fn max_size(mut self: Self, size: usize) -> Self
[src]
Set max inbound frame size.
If max size is set to 0
, size is unlimited.
By default max size is set to 0
pub fn handshake_timeout(mut self: Self, timeout: u64) -> Self
[src]
Set handshake timeout in millis.
By default handshake timeuot is 5 seconds.
pub fn disconnect_timeout(mut self: Self, val: u16) -> Self
[src]
Set server connection disconnect timeout in milliseconds.
Defines a timeout for disconnect connection. If a disconnect procedure does not complete within this time, the connection get dropped.
To disable timeout set value to 0.
By default disconnect timeout is set to 3 seconds.
impl<Io, St, H, Ctl> Server<Io, St, H, Ctl> where
St: 'static,
Io: AsyncRead + AsyncWrite + Unpin + 'static,
H: ServiceFactory<Config = (), Request = Handshake<Io>, Response = HandshakeAck<Io, St>> + 'static,
H::Error: Debug,
Ctl: ServiceFactory<Config = State<St>, Request = ControlFrame, Response = ()> + 'static,
Ctl::Error: Debug,
Ctl::InitError: Debug,
Error: From<Ctl::Error>,
[src]
St: 'static,
Io: AsyncRead + AsyncWrite + Unpin + 'static,
H: ServiceFactory<Config = (), Request = Handshake<Io>, Response = HandshakeAck<Io, St>> + 'static,
H::Error: Debug,
Ctl: ServiceFactory<Config = State<St>, Request = ControlFrame, Response = ()> + 'static,
Ctl::Error: Debug,
Ctl::InitError: Debug,
Error: From<Ctl::Error>,
pub fn control<F, S>(self, service: F) -> Server<Io, St, H, S> where
F: IntoServiceFactory<S>,
S: ServiceFactory<Config = State<St>, Request = ControlFrame, Response = ()> + 'static,
S::Error: Debug,
S::InitError: Debug,
Error: From<S::Error>,
[src]
F: IntoServiceFactory<S>,
S: ServiceFactory<Config = State<St>, Request = ControlFrame, Response = ()> + 'static,
S::Error: Debug,
S::InitError: Debug,
Error: From<S::Error>,
Service to call with control frames
pub fn finish<F, Pb>(
self,
service: F
) -> impl ServiceFactory<Config = (), Request = Io, Response = (), Error = ServerError<H::Error>, InitError = H::InitError> where
F: IntoServiceFactory<Pb>,
Pb: ServiceFactory<Config = State<St>, Request = Link<St>, Response = ()> + 'static,
Pb::Error: Debug,
Pb::InitError: Debug,
Error: From<Pb::Error> + From<Ctl::Error>,
[src]
self,
service: F
) -> impl ServiceFactory<Config = (), Request = Io, Response = (), Error = ServerError<H::Error>, InitError = H::InitError> where
F: IntoServiceFactory<Pb>,
Pb: ServiceFactory<Config = State<St>, Request = Link<St>, Response = ()> + 'static,
Pb::Error: Debug,
Pb::InitError: Debug,
Error: From<Pb::Error> + From<Ctl::Error>,
Set service to execute for incoming links and create service factory
Auto Trait Implementations
impl<Io, St, H, Ctl> !RefUnwindSafe for Server<Io, St, H, Ctl>
[src]
impl<Io, St, H, Ctl> !Send for Server<Io, St, H, Ctl>
[src]
impl<Io, St, H, Ctl> !Sync for Server<Io, St, H, Ctl>
[src]
impl<Io, St, H, Ctl> Unpin for Server<Io, St, H, Ctl> where
Ctl: Unpin,
H: Unpin,
Io: Unpin,
St: Unpin,
[src]
Ctl: Unpin,
H: Unpin,
Io: Unpin,
St: Unpin,
impl<Io, St, H, Ctl> UnwindSafe for Server<Io, St, H, Ctl> where
Ctl: UnwindSafe,
H: UnwindSafe,
Io: UnwindSafe,
St: UnwindSafe,
[src]
Ctl: UnwindSafe,
H: UnwindSafe,
Io: UnwindSafe,
St: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,