pub struct ClientRequest { /* private fields */ }Expand description
This is the sort of information we expect to receive from the receiver. This might not be necessary if we agree on a format.
Implementations§
Source§impl ClientRequest
impl ClientRequest
Sourcepub fn from_config(config: &mut KeyConfig) -> Result<Self, Error>
pub fn from_config(config: &mut KeyConfig) -> Result<Self, Error>
Construct a ClientRequest from a specific KeyConfig instance.
Sourcepub fn from_encoded_config(encoded_config: &[u8]) -> Result<Self, Error>
pub fn from_encoded_config(encoded_config: &[u8]) -> Result<Self, Error>
Reads an encoded configuration and constructs a single use client sender.
See KeyConfig::decode for the structure details.
Sourcepub fn from_encoded_config_list(
encoded_config_list: &[u8],
) -> Result<Self, Error>
pub fn from_encoded_config_list( encoded_config_list: &[u8], ) -> Result<Self, Error>
Reads an encoded list of configurations and constructs a single use client sender
from the first supported configuration.
See KeyConfig::decode_list for the structure details.
Sourcepub fn encapsulate(
self,
request: &[u8],
) -> Result<(Vec<u8>, ClientResponse), Error>
pub fn encapsulate( self, request: &[u8], ) -> Result<(Vec<u8>, ClientResponse), Error>
Encapsulate a request. This consumes this object. This produces a response handler and the bytes of an encapsulated request.
Auto Trait Implementations§
impl Freeze for ClientRequest
impl RefUnwindSafe for ClientRequest
impl Send for ClientRequest
impl Sync for ClientRequest
impl Unpin for ClientRequest
impl UnwindSafe for ClientRequest
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