pub struct RecvLowWatermark(/* private fields */);
Expand description
Socket option for the receive low watermark.
Implements the SOL_SOCKET/SO_RCVLOWAT socket option.
§Examples
Setting the option:
use asyncio::*;
use asyncio::ip::*;
use asyncio::socket_base::RecvLowWatermark;
let ctx = &IoContext::new().unwrap();
let soc = TcpSocket::new(ctx, Tcp::v4()).unwrap();
soc.set_option(RecvLowWatermark::new(1024)).unwrap();
Getting the option:
use asyncio::*;
use asyncio::ip::*;
use asyncio::socket_base::RecvLowWatermark;
let ctx = &IoContext::new().unwrap();
let soc = TcpSocket::new(ctx, Tcp::v4()).unwrap();
let opt: RecvLowWatermark = soc.get_option().unwrap();
let size: usize = opt.get();
Implementations§
Trait Implementations§
Source§impl Clone for RecvLowWatermark
impl Clone for RecvLowWatermark
Source§fn clone(&self) -> RecvLowWatermark
fn clone(&self) -> RecvLowWatermark
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 RecvLowWatermark
impl Default for RecvLowWatermark
Source§fn default() -> RecvLowWatermark
fn default() -> RecvLowWatermark
Returns the “default value” for a type. Read more
Source§impl<P: Protocol> GetSocketOption<P> for RecvLowWatermark
impl<P: Protocol> GetSocketOption<P> for RecvLowWatermark
Source§impl<P: Protocol> SetSocketOption<P> for RecvLowWatermark
impl<P: Protocol> SetSocketOption<P> for RecvLowWatermark
Auto Trait Implementations§
impl Freeze for RecvLowWatermark
impl RefUnwindSafe for RecvLowWatermark
impl Send for RecvLowWatermark
impl Sync for RecvLowWatermark
impl Unpin for RecvLowWatermark
impl UnwindSafe for RecvLowWatermark
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