pub enum Payload {
Request(Request),
Response(Response),
}
Expand description
The data that is sent to and from setting handlers through the service MessageHub.
Variants§
Request(Request)
The Request
payload communicates actions to be taken upon the setting.
These actions can be around access (get/listen) and changes (set). Note
that there is not necessarily a 1:1 relationship between Request
and
Response
defined later. It is possible a single Request
will
result into multiple Response
that are delivered on the same
MessageHub receptor.
Response(Response)
The Response
payload represents the result of a Request
action. Note
that Response is a Result; receipients should confirm whether an error
was returned and if a successful result (wich is an Option) has a value.
Trait Implementations§
Source§impl TryFrom<MessageEvent> for Payload
impl TryFrom<MessageEvent> for Payload
impl StructuralPartialEq for Payload
Auto Trait Implementations§
impl Freeze for Payload
impl RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnwindSafe for Payload
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)