#[non_exhaustive]pub enum Error {
UsernameTooLong,
UsernameContainsNull(usize),
NotConnected,
NoContext,
Spectator,
NoNetwork,
TooMuchAppData,
NotANode,
Lib(Error),
}
Expand description
Error enum for generic errors within the Uds
service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UsernameTooLong
The provided username was too long.
UsernameContainsNull(usize)
The provided username contained a NULL byte.
NotConnected
Not connected to a network.
NoContext
No context bound.
Spectator
Cannot send data on a network as a spectator.
NoNetwork
No network created.
TooMuchAppData
The provided app data buffer was too large.
NotANode
The provided node ID does not reference a specific node.
Lib(Error)
ctru-rs error
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more