pub struct Debug(/* private fields */);
Expand description
Socket option to enable socket-level debugging.
Implements the SOL_SOCKET/SO_DEBUG socket option.
§Examples
Setting the option:
use asyncio::*;
use asyncio::ip::*;
use asyncio::socket_base::Debug;
let ctx = &IoContext::new().unwrap();
let soc = TcpSocket::new(ctx, Tcp::v4()).unwrap();
soc.set_option(Debug::new(true)).unwrap();
Getting the option:
use asyncio::*;
use asyncio::ip::*;
use asyncio::socket_base::Debug;
let ctx = &IoContext::new().unwrap();
let soc = TcpSocket::new(ctx, Tcp::v4()).unwrap();
let opt: Debug = soc.get_option().unwrap();
let is_set: bool = opt.get();
Implementations§
Trait Implementations§
Source§impl<P: Protocol> GetSocketOption<P> for Debug
impl<P: Protocol> GetSocketOption<P> for Debug
Source§impl<P: Protocol> SetSocketOption<P> for Debug
impl<P: Protocol> SetSocketOption<P> for Debug
Auto Trait Implementations§
impl Freeze for Debug
impl RefUnwindSafe for Debug
impl Send for Debug
impl Sync for Debug
impl Unpin for Debug
impl UnwindSafe for Debug
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