[][src]Enum pns::DynamicNet

pub enum DynamicNet {
    Default(Net),
    Simulated(SimulatedNet),
}

A dynamic type, able to store both net kinds.

Variants

Default(Net)

Variant for the default Net type.

Simulated(SimulatedNet)

Variant for the SimulatedNet type.

Implementations

impl DynamicNet[src]

pub fn default(&self) -> Option<&Net>[src]

Convert the dynamic net into a Net

pub fn default_mut(&mut self) -> Option<&mut Net>[src]

Convert the dynamic net into a mutable Net

pub fn simulated(&self) -> Option<&SimulatedNet>[src]

Convert the dynamic net into a SimulatedNet

pub fn simulated_mut(&mut self) -> Option<&mut SimulatedNet>[src]

Convert the dynamic net into a mutable SimulatedNet

pub fn safe(&self) -> &dyn SafeNet[src]

Convert the dynamic net into a SafeNet

pub fn safe_mut(&mut self) -> &mut dyn SafeNet[src]

Convert the dynamic net into a mutable SafeNet

Auto Trait Implementations

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.