[][src]Struct ntex_amqp::server::Server

pub struct Server<Io, St, H, Ctl> { /* fields omitted */ }

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]

pub fn new<F>(handshake: F) -> Self where
    F: IntoServiceFactory<H>, 
[src]

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]

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]

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]

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]

impl<Io, St, H, Ctl> UnwindSafe for Server<Io, St, H, Ctl> where
    Ctl: UnwindSafe,
    H: UnwindSafe,
    Io: UnwindSafe,
    St: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,