Enum minecraft_assets::schemas::blockstates::Variant [−][src]
pub enum Variant {
Single(ModelProperties),
Multiple(Vec<ModelProperties>),
}
Expand description
A block variant.
Each variant can have one model or an array of models and contains
their properties. If set to an array, the model is chosen randomly from the
models contained in the array based on the Model::weight
field.
Variants
Single(ModelProperties)
Tuple Fields
A variant with only a single model to choose from.
Multiple(Vec<ModelProperties>)
Tuple Fields
0: Vec<ModelProperties>
A variant with multiple models to choose from.
Implementations
Returns all of the possible ModelProperties
choices for this variant
as a slice.
The slice will contain one element for a Single
variant, and multiple for a Multiple
variant.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Variant
impl UnwindSafe for Variant
Blanket Implementations
Mutably borrows from an owned value. Read more