Struct asio::socket_base::Debug [] [src]

pub struct Debug(_);

Socket option to enable socket-level debugging.

Implements the SOL_SOCKET/SO_DEBUG socket option.

Examples

Setting the option:

use asio::*;
use asio::ip::*;
use asio::socket_base::Debug;

let io = &IoService::new();
let soc = TcpSocket::new(io, Tcp::v4()).unwrap();

soc.set_option(Debug::new(true)); // for root.

Getting the option:

use asio::*;
use asio::ip::*;
use asio::socket_base::Debug;

let io = &IoService::new();
let soc = TcpSocket::new(io, Tcp::v4()).unwrap();

let opt: Debug = soc.get_option().unwrap();
let is_set: bool = opt.get();

Methods

impl Debug
[src]

fn new(on: bool) -> Debug

fn get(&self) -> bool

fn set(&mut self, on: bool)

Trait Implementations

impl Clone for Debug
[src]

fn clone(&self) -> Debug

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Default for Debug
[src]

fn default() -> Debug

Returns the "default value" for a type. Read more

impl<P: Protocol> SocketOption<P> for Debug
[src]

type Data = i32

fn level(&self, _: &P) -> i32

fn name(&self, _: &P) -> i32

impl<P: Protocol> GetSocketOption<P> for Debug
[src]

fn data_mut(&mut self) -> &mut Self::Data

fn resize(&mut self, _size: usize)

impl<P: Protocol> SetSocketOption<P> for Debug
[src]

fn data(&self) -> &Self::Data

fn size(&self) -> usize