pub struct Server { /* private fields */ }Expand description
A server can handle multiple requests. It holds a single key pair and can generate a configuration. (A more complex server would have multiple key pairs. This is simple.)
Implementations§
Source§impl Server
impl Server
Sourcepub fn decapsulate(
&self,
enc_request: &[u8],
) -> Result<(Vec<u8>, ServerResponse), Error>
pub fn decapsulate( &self, enc_request: &[u8], ) -> Result<(Vec<u8>, ServerResponse), Error>
Remove encapsulation on a request.
§Panics
Not as a consequence of this code, but Rust won’t know that for sure.
Sourcepub fn decapsulate_stream<S>(self, src: S) -> ServerRequestStream<S>
pub fn decapsulate_stream<S>(self, src: S) -> ServerRequestStream<S>
Remove encapsulation on a streamed request.
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