pub struct Server<T: ReadWrite> { /* private fields */ }Expand description
A server for deserializing KMIP requests and serializing KMIP responses from/to an established read/write stream.
Use the crate::net::ServerBuilder to build a Server instance to work with.
Implementations§
Source§impl<T: ReadWrite> Server<T>
impl<T: ReadWrite> Server<T>
Sourcepub fn receive_request(&mut self) -> NetResult<RequestMessage>
pub fn receive_request(&mut self) -> NetResult<RequestMessage>
Receive a KMIP request from the network.
Unlike do_request() and do_requests() this function only performs the receiving half of the message exchange as the caller has to inspect the received message and determinate an appropriate response.
pub fn send_response(&mut self, response: ResponseMessage) -> NetResult<()>
pub fn send_response_payload( &mut self, result_status: ResultStatus, result_reason: Option<ResultReason>, result_message: Option<String>, payload: Option<ResponsePayload>, ) -> NetResult<()>
pub fn send_response_batch( &mut self, batch_items: Vec<BatchItem>, ) -> NetResult<()>
Trait Implementations§
Auto Trait Implementations§
impl<T> Forget for Server<T>
impl<T> Freeze for Server<T>
impl<T> RefUnwindSafe for Server<T>
impl<T> Send for Server<T>
impl<T> Sync for Server<T>
impl<T> Unpin for Server<T>
impl<T> UnsafeUnpin for Server<T>
impl<T> UnwindSafe for Server<T>
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