Enum DatapackFieldKind
#[non_exhaustive]pub enum DatapackFieldKind {
Bool,
Int {
min: i64,
max: i64,
},
Float {
min: f64,
max: f64,
},
Text {
max_len: u32,
},
Identifier,
Reference {
registry: String,
},
}Expand description
What a schema field holds, with the bounds the game enforces.
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.
Bool
true or false.
Int
An integral JSON number in [min, max].
Float
A finite JSON number in [min, max]; an integral number is accepted.
Text
A string of at most max_len bytes.
Identifier
A resource id (minecraft: when it names no namespace).
Reference
An id naming an entry of the registry registry; the game resolves it
against the whole candidate set, so it may name an entry no pack
has defined yet.
Trait Implementations§
§impl Clone for DatapackFieldKind
impl Clone for DatapackFieldKind
§fn clone(&self) -> DatapackFieldKind
fn clone(&self) -> DatapackFieldKind
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 DatapackFieldKind
impl Debug for DatapackFieldKind
§impl PartialEq for DatapackFieldKind
impl PartialEq for DatapackFieldKind
impl StructuralPartialEq for DatapackFieldKind
Auto Trait Implementations§
impl Freeze for DatapackFieldKind
impl RefUnwindSafe for DatapackFieldKind
impl Send for DatapackFieldKind
impl Sync for DatapackFieldKind
impl Unpin for DatapackFieldKind
impl UnsafeUnpin for DatapackFieldKind
impl UnwindSafe for DatapackFieldKind
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