pub struct RegisterResources { /* private fields */ }Expand description
Component metadata used when registering resources
Implementations§
Source§impl RegisterResources
impl RegisterResources
Sourcepub fn register_pin<P>(
&self,
pin_name: &'static str,
) -> Result<P, PinRegisterError>where
P: HalPin,
pub fn register_pin<P>(
&self,
pin_name: &'static str,
) -> Result<P, PinRegisterError>where
P: HalPin,
Register a pin with this component.
The pin name will be prefixed with the component name
Sourcepub fn register_parameter<P>(
&self,
parameter_name: &'static str,
) -> Result<P, ParameterRegisterError>where
P: HalParameter,
pub fn register_parameter<P>(
&self,
parameter_name: &'static str,
) -> Result<P, ParameterRegisterError>where
P: HalParameter,
Register a read/write parameter with this component.
The parameter name will be prefixed with the component name.
To register a pin that LinuxCNC cannot write to, call RegisterResources::register_readonly_parameter.
Sourcepub fn register_readonly_parameter<P>(
&self,
parameter_name: &'static str,
) -> Result<P, ParameterRegisterError>where
P: HalParameter,
pub fn register_readonly_parameter<P>(
&self,
parameter_name: &'static str,
) -> Result<P, ParameterRegisterError>where
P: HalParameter,
Register a read only parameter with this component.
The parameter name will be prefixed with the component name
Auto Trait Implementations§
impl Freeze for RegisterResources
impl RefUnwindSafe for RegisterResources
impl Send for RegisterResources
impl Sync for RegisterResources
impl Unpin for RegisterResources
impl UnwindSafe for RegisterResources
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