#[non_exhaustive]pub enum ModifyError {
NotServer,
NotPlayer,
Refused(u32),
}Expand description
Why a modifier was not set.
§Examples
use enshwick::stats::ModifyError;
assert_eq!(ModifyError::NotServer.to_string(), "only the server keeps modifiers");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.
NotServer
Called on a client that hosts no game.
NotPlayer
A saved modifier for an entity that is no player.
Refused(u32)
The loader refused for another reason.
Trait Implementations§
Source§impl Clone for ModifyError
impl Clone for ModifyError
impl Copy for ModifyError
Source§impl Debug for ModifyError
impl Debug for ModifyError
Source§impl Display for ModifyError
impl Display for ModifyError
impl Eq for ModifyError
Source§impl Error for ModifyError
impl Error for ModifyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ModifyError> for Off
impl From<ModifyError> for Off
Source§fn from(error: ModifyError) -> Self
fn from(error: ModifyError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ModifyError
impl PartialEq for ModifyError
impl StructuralPartialEq for ModifyError
Auto Trait Implementations§
impl Freeze for ModifyError
impl RefUnwindSafe for ModifyError
impl Send for ModifyError
impl Sync for ModifyError
impl Unpin for ModifyError
impl UnsafeUnpin for ModifyError
impl UnwindSafe for ModifyError
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