pub struct Client { /* private fields */ }
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(server_name: String) -> Result<Client, Error>
pub fn new(server_name: String) -> Result<Client, Error>
Uses a unbounded channel to transfer data.
Sourcepub fn new_with_size(
server_name: String,
channel_size: Option<usize>,
) -> Result<Client, Error>
pub fn new_with_size( server_name: String, channel_size: Option<usize>, ) -> Result<Client, Error>
new client with a choice of bounded or unbounded based on the channel_size bening Some(size) or None
pub fn take(&mut self, size: usize) -> Vec<Arc<Packet>>
pub fn recv(&mut self, size: usize) -> Result<Option<Vec<Arc<Packet>>>, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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