Enum AttributeRegistrationError
#[non_exhaustive]pub enum AttributeRegistrationError {
WrongSide,
InvalidId,
Duplicate,
NotFinite,
InvalidBounds,
}Expand description
Why a mod’s attribute type declaration was refused
(Registrar::declare_attribute).
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.
WrongSide
Only both-side packages may change the attribute registry.
InvalidId
The attribute’s id is malformed, empty or in a namespace the declaring mod does not own (a vanilla attribute’s included).
Duplicate
Another declaration already covers the attribute.
NotFinite
The default or a bound is not finite.
InvalidBounds
min > max, or the default is not inside [min, max]
(RangedAttribute’s own checks).
Trait Implementations§
§impl Clone for AttributeRegistrationError
impl Clone for AttributeRegistrationError
§fn clone(&self) -> AttributeRegistrationError
fn clone(&self) -> AttributeRegistrationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for AttributeRegistrationError
impl Debug for AttributeRegistrationError
impl Eq for AttributeRegistrationError
§impl PartialEq for AttributeRegistrationError
impl PartialEq for AttributeRegistrationError
impl StructuralPartialEq for AttributeRegistrationError
Auto Trait Implementations§
impl Freeze for AttributeRegistrationError
impl RefUnwindSafe for AttributeRegistrationError
impl Send for AttributeRegistrationError
impl Sync for AttributeRegistrationError
impl Unpin for AttributeRegistrationError
impl UnsafeUnpin for AttributeRegistrationError
impl UnwindSafe for AttributeRegistrationError
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