pub enum DeviceRequest {
GetResolution {
responder: DeviceGetResolutionResponder,
},
GetSample {
channel_id: u32,
responder: DeviceGetSampleResponder,
},
}Variants§
GetResolution
Get adc resolution in number of bits.
Fields
§
responder: DeviceGetResolutionResponderGetSample
Get sample - raw count from adc - of the ADC channel indicated by channel_id.
Implementations§
Source§impl DeviceRequest
impl DeviceRequest
pub fn into_get_resolution(self) -> Option<DeviceGetResolutionResponder>
pub fn into_get_sample(self) -> Option<(u32, DeviceGetSampleResponder)>
pub fn new_get_resolution(self, tx_id: u32) -> Self
pub fn new_get_sample(self, channel_id: u32, tx_id: u32) -> Self
pub fn get_resolution_as_message( arena: Arena, tx_id: u32, ) -> Result<Message<[u8]>, Error>
pub fn get_sample_as_message( arena: Arena, channel_id: u32, tx_id: u32, ) -> Result<Message<[u8]>, Error>
pub fn read_from( bytes: &[u8], _handles: &mut [HandleInfo], ) -> Result<Self, Error>
pub fn read_from_message(message: Message<[u8]>) -> Result<(Arena, Self), Error>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Source§impl Debug for DeviceRequest
impl Debug for DeviceRequest
Source§impl TryFrom<Message<[u8]>> for DeviceRequest
Available on crate feature driver only.Like DeviceRequest::read_from_message except it drops the [Arena].
impl TryFrom<Message<[u8]>> for DeviceRequest
Available on crate feature
driver only.Like DeviceRequest::read_from_message except it drops the [Arena].
Auto Trait Implementations§
impl Freeze for DeviceRequest
impl RefUnwindSafe for DeviceRequest
impl Send for DeviceRequest
impl Sync for DeviceRequest
impl Unpin for DeviceRequest
impl UnsafeUnpin for DeviceRequest
impl UnwindSafe for DeviceRequest
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