pub struct BytesReadable(/* private fields */);
Expand description
IO control command to get the amount of data that can be read without blocking.
Implements the FIONREAD IO control command.
§Examples
Gettable the IO control:
use asyncio::*;
use asyncio::ip::*;
use asyncio::socket_base::BytesReadable;
let ctx = &IoContext::new().unwrap();
let soc = UdpSocket::new(ctx, Udp::v4()).unwrap();
let mut bytes = BytesReadable::default();
soc.io_control(&mut bytes).unwrap();
let sized = bytes.get();
Implementations§
Trait Implementations§
Source§impl Clone for BytesReadable
impl Clone for BytesReadable
Source§fn clone(&self) -> BytesReadable
fn clone(&self) -> BytesReadable
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for BytesReadable
impl Default for BytesReadable
Source§fn default() -> BytesReadable
fn default() -> BytesReadable
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BytesReadable
impl RefUnwindSafe for BytesReadable
impl Send for BytesReadable
impl Sync for BytesReadable
impl Unpin for BytesReadable
impl UnwindSafe for BytesReadable
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