pub enum RecvMsg {
Request(Request),
Notify(Notify),
}Variants§
Implementations§
source§impl RecvMsg
impl RecvMsg
sourcepub fn is_request(&self) -> bool
pub fn is_request(&self) -> bool
Returns true if this is a RecvMsg::Request, otherwise false
sourcepub fn as_request_mut(&mut self) -> Option<&mut Request>
pub fn as_request_mut(&mut self) -> Option<&mut Request>
Optionally returns mutable references to the inner fields if this is a RecvMsg::Request, otherwise None
sourcepub fn as_request(&self) -> Option<&Request>
pub fn as_request(&self) -> Option<&Request>
Optionally returns references to the inner fields if this is a RecvMsg::Request, otherwise None
sourcepub fn into_request(self) -> Result<Request, Self>
pub fn into_request(self) -> Result<Request, Self>
Returns the inner fields if this is a RecvMsg::Request, otherwise returns back the enum in the Err case of the result
sourcepub fn as_notify_mut(&mut self) -> Option<&mut Notify>
pub fn as_notify_mut(&mut self) -> Option<&mut Notify>
Optionally returns mutable references to the inner fields if this is a RecvMsg::Notify, otherwise None
sourcepub fn as_notify(&self) -> Option<&Notify>
pub fn as_notify(&self) -> Option<&Notify>
Optionally returns references to the inner fields if this is a RecvMsg::Notify, otherwise None
sourcepub fn into_notify(self) -> Result<Notify, Self>
pub fn into_notify(self) -> Result<Notify, Self>
Returns the inner fields if this is a RecvMsg::Notify, otherwise returns back the enum in the Err case of the result
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RecvMsg
impl Send for RecvMsg
impl Sync for RecvMsg
impl Unpin for RecvMsg
impl !UnwindSafe for RecvMsg
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