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§
Source§impl ExtractUserData for RecvMsg
impl ExtractUserData for RecvMsg
fn user_data_raw(&self) -> &dyn UserData
fn user_data_owned(&self) -> OwnedUserData
fn extract_sender(&self) -> Sender
fn user_data<T: UserData>(&self) -> Option<&T>
Auto Trait Implementations§
impl !Freeze for RecvMsg
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