Struct cameleon::genapi::RegisterNode
source · pub struct RegisterNode(_);
Expand description
A node that has IRegister
interface.
Implementations§
source§impl RegisterNode
impl RegisterNode
sourcepub fn read<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>,
buf: &mut [u8]
) -> GenApiResult<()>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn read<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt>, buf: &mut [u8] ) -> GenApiResult<()>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Reads bytes from the register.
buf.len()
must be same as the register length returned from Self::length
.
sourcepub fn write<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>,
data: &[u8]
) -> GenApiResult<()>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn write<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt>, data: &[u8] ) -> GenApiResult<()>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Writes bytes to the register.
data.len()
must be same as the register length returned from IRegister::length
.
sourcepub fn address<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>
) -> GenApiResult<i64>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn address<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt> ) -> GenApiResult<i64>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Returns the address of the register that the node pointing to.
sourcepub fn length<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>
) -> GenApiResult<i64>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn length<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt> ) -> GenApiResult<i64>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Returns the length of the register that the node pointing to.
Trait Implementations§
source§impl Clone for RegisterNode
impl Clone for RegisterNode
source§fn clone(&self) -> RegisterNode
fn clone(&self) -> RegisterNode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RegisterNode
impl Debug for RegisterNode
source§impl Hash for RegisterNode
impl Hash for RegisterNode
source§impl PartialEq<RegisterNode> for RegisterNode
impl PartialEq<RegisterNode> for RegisterNode
source§fn eq(&self, other: &RegisterNode) -> bool
fn eq(&self, other: &RegisterNode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for RegisterNode
impl Eq for RegisterNode
impl StructuralEq for RegisterNode
impl StructuralPartialEq for RegisterNode
Auto Trait Implementations§
impl RefUnwindSafe for RegisterNode
impl Send for RegisterNode
impl Sync for RegisterNode
impl Unpin for RegisterNode
impl UnwindSafe for RegisterNode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more