[][src]Struct ksz8863::miim::PhyReg

pub struct PhyReg<'phy, 'miim, T, R> {
    pub phy: &'phy mut Phy<'miim, T>,
    // some fields omitted
}

A wrapper around an miim::Read and/or miim::Write implementation for a particular register on a particular PHY.

Fields

phy: &'phy mut Phy<'miim, T>

Implementations

impl<'phy, 'miim, T, R> PhyReg<'phy, 'miim, T, R> where
    R: Register
[src]

pub fn read(&mut self) -> Result<R, T::Error> where
    T: Read
[src]

Read from the register R associated with the specified PHY.

pub fn write<F>(&mut self, write: F) -> Result<(), T::Error> where
    T: Write,
    F: for<'a, 'b> FnOnce(&'a mut W<&'b mut R>) -> &'a mut W<&'b mut R>, 
[src]

Write to the register R associated with the specified PHY.

pub fn modify<F, E>(&mut self, modify: F) -> Result<(), E> where
    T: Read<Error = E> + Write<Error = E>,
    F: for<'a, 'b> FnOnce(&'a mut W<&'b mut R>) -> &'a mut W<&'b mut R>, 
[src]

Modify the register R associated with the specified PHY.

This first reads the value from the register, delivers it to the user via the modify function, and then writes the result.

Auto Trait Implementations

impl<'phy, 'miim, T, R> Send for PhyReg<'phy, 'miim, T, R> where
    R: Send,
    T: Send
[src]

impl<'phy, 'miim, T, R> Sync for PhyReg<'phy, 'miim, T, R> where
    R: Sync,
    T: Sync
[src]

impl<'phy, 'miim, T, R> Unpin for PhyReg<'phy, 'miim, T, R> where
    R: Unpin,
    'miim: 'phy, 
[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> 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.