pub struct RdpError { /* private fields */ }
Implementations§
Source§impl RdpError
impl RdpError
Sourcepub fn new(kind: RdpErrorKind, message: &str) -> Self
pub fn new(kind: RdpErrorKind, message: &str) -> Self
create a new RDP error
§Example
use rdp::model::error::{RdpError, RdpErrorKind};
let error = RdpError::new(RdpErrorKind::Disconnect, "disconnected");
Sourcepub fn kind(&self) -> RdpErrorKind
pub fn kind(&self) -> RdpErrorKind
Return the kind of error
§Example
use rdp::model::error::{RdpError, RdpErrorKind};
let error = RdpError::new(RdpErrorKind::Disconnect, "disconnected");
assert_eq!(error.kind(), RdpErrorKind::Disconnect)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RdpError
impl RefUnwindSafe for RdpError
impl Send for RdpError
impl Sync for RdpError
impl Unpin for RdpError
impl UnwindSafe for RdpError
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