pub struct PollRequest {
pub request_data: Option<Vec<u8>>,
}
Expand description
A request to manually poll external services/hardware.
Depending on the provider implementation, leaving Data
empty may poll all
services/hardware, it may perform an entirely different action, or it could
return an error.
Fields§
§request_data: Option<Vec<u8>>
Bytes which can be serialised from any type of data structure, depending on the implementation of the provider. For an HTTP based provider it could be a hash map of API endpoints and parameters, for a NATS based provider it could be a list of topics to publish to, or it could simply be a list of Sensor IDs to poll for readings.
The effect of leaving this empty will depend on the provider implementation.
Trait Implementations§
Source§impl Clone for PollRequest
impl Clone for PollRequest
Source§fn clone(&self) -> PollRequest
fn clone(&self) -> PollRequest
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 PollRequest
impl Debug for PollRequest
Source§impl Default for PollRequest
impl Default for PollRequest
Source§fn default() -> PollRequest
fn default() -> PollRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PollRequest
impl<'de> Deserialize<'de> for PollRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PollRequest
impl PartialEq for PollRequest
Source§impl Serialize for PollRequest
impl Serialize for PollRequest
impl Eq for PollRequest
impl StructuralPartialEq for PollRequest
Auto Trait Implementations§
impl Freeze for PollRequest
impl RefUnwindSafe for PollRequest
impl Send for PollRequest
impl Sync for PollRequest
impl Unpin for PollRequest
impl UnwindSafe for PollRequest
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