Enum minecraft_assets::api::ResourceKind [−][src]
pub enum ResourceKind {
BlockStates,
BlockModel,
ItemModel,
Texture,
TextureMeta,
}
Expand description
The type of a resource.
Variants
BlockStates
Resources (.json
) in assets/<namespace>/blockstates/
.
BlockModel
Resources (.json
) in assets/<namespace>/models/block/
.
ItemModel
Resources (.json
) in assets/<namespace>/models/item/
.
Texture
Resources (.png
) in assets/<namespace>/textures/
.
TextureMeta
Resources (.png.mcmeta
) in assets/<namespace>/textures/
.
Implementations
Returns the category of this resource type (assets or data).
Returns the file extension used for this resource’s file.
Example
let kind = ResourceKind::BlockStates;
assert_eq!(kind.extension(), "json");
let kind = ResourceKind::Texture;
assert_eq!(kind.extension(), "png");
let kind = ResourceKind::TextureMeta;
assert_eq!(kind.extension(), "png.mcmeta");
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ResourceKind
impl Send for ResourceKind
impl Sync for ResourceKind
impl Unpin for ResourceKind
impl UnwindSafe for ResourceKind
Blanket Implementations
Mutably borrows from an owned value. Read more