pub struct Request { /* private fields */ }Expand description
Line request operations
Allows interaction with a set of requested lines.
Implementations§
Source§impl Request
impl Request
Sourcepub fn value(&self, offset: Offset) -> Result<Value>
pub fn value(&self, offset: Offset) -> Result<Value>
Get the value (0 or 1) of a single line associated with the request.
Sourcepub fn values_subset(&self, offsets: &[Offset]) -> Result<ValueMap>
pub fn values_subset(&self, offsets: &[Offset]) -> Result<ValueMap>
Get values of a subset of lines associated with the request.
Sourcepub fn set_value(&mut self, offset: Offset, value: Value) -> Result<&mut Self>
pub fn set_value(&mut self, offset: Offset, value: Value) -> Result<&mut Self>
Set the value of a single line associated with the request.
Sourcepub fn set_values_subset(&mut self, map: ValueMap) -> Result<&mut Self>
pub fn set_values_subset(&mut self, map: ValueMap) -> Result<&mut Self>
Set values of a subset of lines associated with the request.
Sourcepub fn set_values(&mut self, values: &[Value]) -> Result<&mut Self>
pub fn set_values(&mut self, values: &[Value]) -> Result<&mut Self>
Set values of all lines associated with the request.
Sourcepub fn reconfigure_lines(&mut self, lconfig: &Config) -> Result<&mut Self>
pub fn reconfigure_lines(&mut self, lconfig: &Config) -> Result<&mut Self>
Update the configuration of lines associated with the line request.
Sourcepub fn wait_edge_events(&self, timeout: Option<Duration>) -> Result<bool>
pub fn wait_edge_events(&self, timeout: Option<Duration>) -> Result<bool>
Wait for edge events on any of the lines associated with the request.
Sourcepub fn read_edge_events<'a>(&self, buffer: &'a mut Buffer) -> Result<Events<'a>>
pub fn read_edge_events<'a>(&self, buffer: &'a mut Buffer) -> Result<Events<'a>>
Get a number of edge events from a line request.
This function will block if no event was queued for the line.
Trait Implementations§
impl Eq for Request
impl Send for Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl !Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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