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

pub struct Server<Io, St, Cn: ServiceFactory> { /* fields omitted */ }

Server dispatcher factory

Methods

impl<Io, St, Cn> Server<Io, St, Cn> where
    St: 'static,
    Io: AsyncRead + AsyncWrite + Unpin + 'static,
    Cn: ServiceFactory<Config = (), Request = Either<Connect<Io>, Sasl<Io>>, Response = ConnectAck<Io, St>> + 'static, 
[src]

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

Create server factory and provide connect service

pub fn config(self, config: Configuration) -> Self[src]

Provide connection configuration

pub fn max_size(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(self, timeout: u64) -> Self[src]

Set handshake timeout in millis.

By default handshake timeuot is disabled.

pub fn control<F, S>(self, f: F) -> Self where
    F: IntoServiceFactory<S>,
    S: ServiceFactory<Config = (), Request = ControlFrame<St>, Response = (), InitError = ()> + 'static,
    S::Error: Into<LinkError>, 
[src]

Service to call with control frames

pub fn disconnect<F, Out>(self, disconnect: F) -> Self where
    F: Fn(&mut St, Option<&ServerError<Cn::Error>>) -> Out + 'static,
    Out: Future + 'static, 
[src]

Callback to execute on disconnect

Second parameter indicates error occured during disconnect.

pub fn finish<F, Pb>(
    self,
    service: F
) -> impl ServiceFactory<Config = (), Request = Io, Response = (), Error = ServerError<Cn::Error>> where
    F: IntoServiceFactory<Pb>,
    Pb: ServiceFactory<Config = State<St>, Request = Link<St>, Response = ()> + 'static,
    Pb::Error: Display + Into<Error>,
    Pb::InitError: Display + Into<Error>, 
[src]

Set service to execute for incoming links and create service factory

Auto Trait Implementations

impl<Io, St, Cn> !RefUnwindSafe for Server<Io, St, Cn>

impl<Io, St, Cn> !Send for Server<Io, St, Cn>

impl<Io, St, Cn> !Sync for Server<Io, St, Cn>

impl<Io, St, Cn> Unpin for Server<Io, St, Cn> where
    Cn: Unpin,
    Io: Unpin,
    St: Unpin

impl<Io, St, Cn> !UnwindSafe for Server<Io, St, Cn>

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, 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>,