Skip to main content

Model16

Struct Model16 

Source
pub struct Model16 {
    pub nam: Option<String>,
    pub cfg: Cfg,
    pub ctl: Ctl,
    pub addr: String,
    pub msk: String,
    pub gw: Option<String>,
    pub dns1: Option<String>,
    pub dns2: Option<String>,
    pub mac: Option<String>,
    pub lnk_ctl: Option<LnkCtl>,
}
Available on crate feature model16 only.
Expand description

Simple IP Network

Include this model for a simple IPv4 network stack

Fields§

§nam: Option<String>

Name

Interface name. (8 chars)

§cfg: Cfg

Config

Enumerated value. Force IPv4 configuration method

§ctl: Ctl

Control

Bitmask value Configure use of services

§addr: String

Address

IP address

§msk: String

Netmask

Netmask

§gw: Option<String>

Gateway

Gateway IP address

§dns1: Option<String>

DNS1

32 bit IP address of DNS server

§dns2: Option<String>

DNS2

32 bit IP address of DNS server

§mac: Option<String>

MAC

IEEE MAC address of this interface

§lnk_ctl: Option<LnkCtl>

Link Control

Bitmask value. Link control flags

Implementations§

Source§

impl Model16

Source

pub const NAM: Point<Self, Option<String>>

Source

pub const CFG: Point<Self, Cfg>

Source

pub const CTL: Point<Self, Ctl>

Source

pub const ADDR: Point<Self, String>

Source

pub const MSK: Point<Self, String>

Source

pub const GW: Point<Self, Option<String>>

Source

pub const DNS1: Point<Self, Option<String>>

Source

pub const DNS2: Point<Self, Option<String>>

Source

pub const MAC: Point<Self, Option<String>>

Source

pub const LNK_CTL: Point<Self, Option<LnkCtl>>

Trait Implementations§

Source§

impl Debug for Model16

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Group for Model16

Source§

const LEN: u16 = 52

Group length (without nested and repeating groups)
Source§

impl Model for Model16

Source§

const ID: u16 = 16

Model ID
Source§

fn addr(models: &Models) -> ModelAddr<Self>

Get model address from discovered models struct
Source§

fn parse(data: &[u16]) -> Result<Self, ParseError<Self>>

Parse model data from a given u16 slice

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.