[][src]Struct pcap_on_demand::Device

pub struct Device {
    pub name: String,
    pub desc: Option<String>,
}

A network device name and (potentially) pcap's description of it.

Fields

name: Stringdesc: Option<String>

Implementations

impl Device[src]

pub fn open(self) -> Result<Capture<Active>, Error>[src]

Opens a Capture<Active> on this device.

pub fn lookup() -> Result<Device, Error>[src]

Returns the default Device suitable for captures according to pcap_lookupdev, or an error from pcap.

pub fn list() -> Result<Vec<Device>, Error>[src]

Returns a vector of Devices known by pcap via pcap_findalldevs.

Trait Implementations

impl Debug for Device[src]

impl<'a> Into<Device> for &'a str[src]

Auto Trait Implementations

impl RefUnwindSafe for Device

impl Send for Device

impl Sync for Device

impl Unpin for Device

impl UnwindSafe for Device

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.