pub struct Client<A, B> { /* private fields */ }
Implementations§
Source§impl<A> Client<A, PlainBytes>
impl<A> Client<A, PlainBytes>
pub fn new<S>(
stream: S,
cfg: Config,
recon_strat: Option<ReconStrat<S>>,
) -> Selfwhere
S: ByteStream,
Source§impl<A> Client<A, EncryptedBytes>
impl<A> Client<A, EncryptedBytes>
pub fn new_encrypted<S>(
stream: S,
cfg: Config,
recon_strat: Option<ReconStrat<S>>,
pub_key: PublicKey,
) -> Selfwhere
S: ByteStream,
Available on crate feature
encrypted
only.Source§impl<A, B> Client<A, B>where
A: Action,
B: PacketBytes,
impl<A, B> Client<A, B>where
A: Action,
B: PacketBytes,
pub async fn request<R>(&self, req: R) -> Result<R::Response, R::Error>where
R: Request<Action = A> + IntoMessage<A, B>,
R::Response: FromMessage<A, B>,
R::Error: FromMessage<A, B>,
Auto Trait Implementations§
impl<A, B> Freeze for Client<A, B>
impl<A, B> !RefUnwindSafe for Client<A, B>
impl<A, B> Send for Client<A, B>
impl<A, B> Sync for Client<A, B>
impl<A, B> Unpin for Client<A, B>
impl<A, B> !UnwindSafe for Client<A, B>
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