[][src]Enum ksz8863::miim::State

pub enum State {
    Bcr(Bcr),
    Bsr(Bsr),
    PhyIdR1(PhyIdR1),
    PhyIdR2(PhyIdR2),
    Anar(Anar),
    Anlpar(Anlpar),
    LinkMd(LinkMd),
    PhySpecial(PhySpecial),
}

A dynamic representation of a register's state.

Variants

Bcr(Bcr)
Bsr(Bsr)
PhyIdR1(PhyIdR1)
PhyIdR2(PhyIdR2)
Anar(Anar)
Anlpar(Anlpar)
LinkMd(LinkMd)
PhySpecial(PhySpecial)

Implementations

impl State[src]

pub fn from_addr_and_data(addr: Address, data: u16) -> Self[src]

Construct a register state from its address and data represented as a u32.

pub fn from_addr_default(addr: Address) -> Self[src]

Construct the default register state associated with the given address.

pub fn addr(&self) -> Address[src]

The address of the register with which this state is associated.

pub fn reg<R>(&self) -> Result<&R, InvalidAddress> where
    R: 'static + Register
[src]

Attempt to retrieve a reference to a register of type R from the dynamic register State representation.

Returns an Err if the register type does not match.

pub fn reg_mut<R>(&mut self) -> Result<&mut R, InvalidAddress> where
    R: 'static + Register
[src]

Attempt to retrieve a mutable reference to a register of type R from the dynamic register State representation.

Returns an Err if the register type does not match.

Trait Implementations

impl Clone for State[src]

impl Copy for State[src]

impl Debug for State[src]

impl<'de> Deserialize<'de> for State[src]

impl Eq for State[src]

impl From<Anar> for State[src]

impl From<Anlpar> for State[src]

impl From<Bcr> for State[src]

impl From<Bsr> for State[src]

impl From<LinkMd> for State[src]

impl From<PhyIdR1> for State[src]

impl From<PhyIdR2> for State[src]

impl From<PhySpecial> for State[src]

impl From<State> for u16[src]

impl Hash for State[src]

impl Hash for State[src]

impl PartialEq<State> for State[src]

impl Serialize for State[src]

impl StructuralEq for State[src]

impl StructuralPartialEq for State[src]

impl TryFrom<State> for Bcr[src]

type Error = InvalidAddress

The type returned in the event of a conversion error.

impl TryFrom<State> for Bsr[src]

type Error = InvalidAddress

The type returned in the event of a conversion error.

impl TryFrom<State> for PhyIdR1[src]

type Error = InvalidAddress

The type returned in the event of a conversion error.

impl TryFrom<State> for PhyIdR2[src]

type Error = InvalidAddress

The type returned in the event of a conversion error.

impl TryFrom<State> for Anar[src]

type Error = InvalidAddress

The type returned in the event of a conversion error.

impl TryFrom<State> for Anlpar[src]

type Error = InvalidAddress

The type returned in the event of a conversion error.

impl TryFrom<State> for LinkMd[src]

type Error = InvalidAddress

The type returned in the event of a conversion error.

impl TryFrom<State> for PhySpecial[src]

type Error = InvalidAddress

The type returned in the event of a conversion error.

impl uDebug for State[src]

Auto Trait Implementations

impl Send for State[src]

impl Sync for State[src]

impl Unpin for State[src]

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> Conv for T

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> FmtForward for T

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

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

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.