[−][src]Struct ntex_amqp::server::Server
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]
St: 'static,
Io: AsyncRead + AsyncWrite + Unpin + 'static,
Cn: ServiceFactory<Config = (), Request = Either<Connect<Io>, Sasl<Io>>, Response = ConnectAck<Io, St>> + 'static,
pub fn new<F>(connect: F) -> Self where
F: IntoServiceFactory<Cn>,
[src]
F: IntoServiceFactory<Cn>,
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]
F: IntoServiceFactory<S>,
S: ServiceFactory<Config = (), Request = ControlFrame<St>, Response = (), InitError = ()> + 'static,
S::Error: Into<LinkError>,
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]
F: Fn(&mut St, Option<&ServerError<Cn::Error>>) -> Out + 'static,
Out: Future + 'static,
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]
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>,
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,
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]
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[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.
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.
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>,