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