pub struct Server { /* private fields */ }
Implementations§
Source§impl Server
impl Server
pub fn new(options: Options, greeting: Greeting<'static>) -> Self
Sourcepub fn enqueue_data(&mut self, data: Data<'static>) -> ResponseHandle
pub fn enqueue_data(&mut self, data: Data<'static>) -> ResponseHandle
Enqueues the Data
response for being sent to the client.
The response is not sent immediately but during one of the next calls of
Server::next
. All responses are sent in the same order they have been
enqueued.
Sourcepub fn enqueue_status(&mut self, status: Status<'static>) -> ResponseHandle
pub fn enqueue_status(&mut self, status: Status<'static>) -> ResponseHandle
Enqueues the Status
response for being sent to the client.
The response is not sent immediately but during one of the next calls of
Server::next
. All responses are sent in the same order they have been
enqueued.
Sourcepub fn enqueue_continuation_request(
&mut self,
continuation_request: CommandContinuationRequest<'static>,
) -> ResponseHandle
pub fn enqueue_continuation_request( &mut self, continuation_request: CommandContinuationRequest<'static>, ) -> ResponseHandle
Enqueues the CommandContinuationRequest
response for being sent to the client.
The response is not sent immediately but during one of the next calls of
Server::next
. All responses are sent in the same order they have been
enqueued.
pub fn authenticate_continue( &mut self, continuation_request: CommandContinuationRequest<'static>, ) -> Result<ResponseHandle, CommandContinuationRequest<'static>>
pub fn authenticate_finish( &mut self, status: Status<'static>, ) -> Result<ResponseHandle, Status<'static>>
pub fn idle_accept( &mut self, continuation_request: CommandContinuationRequest<'static>, ) -> Result<ResponseHandle, CommandContinuationRequest<'static>>
pub fn idle_reject( &mut self, status: Status<'static>, ) -> Result<ResponseHandle, Status<'static>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Server
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnwindSafe for Server
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more