Enum DatapackRegistrationError
#[non_exhaustive]pub enum DatapackRegistrationError {
WrongSide,
InvalidKey,
Duplicate,
InvalidFieldName,
InvalidFieldKind,
InvalidDefault,
}Expand description
Why a mod’s datapack registry declaration was refused
(Registrar::declare_datapack_registry).
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 declare datapack registries.
InvalidKey
The registry’s key is malformed, empty or in a namespace the declaring mod does not own (a vanilla registry’s included).
Duplicate
Another declaration already covers the registry key.
InvalidFieldName
A field name is empty or repeated.
InvalidFieldKind
A field’s kind is unusable: bounds that are not finite or min > max,
a max_len of 0, or a reference to a malformed registry key.
InvalidDefault
A default is not a value of its field’s kind, or is out of its bounds.
Trait Implementations§
§impl Clone for DatapackRegistrationError
impl Clone for DatapackRegistrationError
§fn clone(&self) -> DatapackRegistrationError
fn clone(&self) -> DatapackRegistrationError
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 DatapackRegistrationError
impl Debug for DatapackRegistrationError
impl Eq for DatapackRegistrationError
§impl PartialEq for DatapackRegistrationError
impl PartialEq for DatapackRegistrationError
impl StructuralPartialEq for DatapackRegistrationError
Auto Trait Implementations§
impl Freeze for DatapackRegistrationError
impl RefUnwindSafe for DatapackRegistrationError
impl Send for DatapackRegistrationError
impl Sync for DatapackRegistrationError
impl Unpin for DatapackRegistrationError
impl UnsafeUnpin for DatapackRegistrationError
impl UnwindSafe for DatapackRegistrationError
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