pub struct GenericBlockState {
pub name: Cow<'static, str>,
pub properties: HashMap<Cow<'static, str>, Cow<'static, str>>,
}Expand description
A generic block state that can represent any possible block state by storing the name and properties as strings.
Fields§
§name: Cow<'static, str>The id of this block, e.g. minecraft:air.
properties: HashMap<Cow<'static, str>, Cow<'static, str>>The properties of this block state as a map from names to values.
Trait Implementations§
Source§impl BlockState for GenericBlockState
impl BlockState for GenericBlockState
Source§impl Clone for GenericBlockState
impl Clone for GenericBlockState
Source§fn clone(&self) -> GenericBlockState
fn clone(&self) -> GenericBlockState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GenericBlockState
impl Debug for GenericBlockState
Source§impl<'de> Deserialize<'de> for GenericBlockState
impl<'de> Deserialize<'de> for GenericBlockState
Source§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
Source§impl PartialEq for GenericBlockState
impl PartialEq for GenericBlockState
Source§impl Serialize for GenericBlockState
impl Serialize for GenericBlockState
impl Eq for GenericBlockState
impl StructuralPartialEq for GenericBlockState
Auto Trait Implementations§
impl Freeze for GenericBlockState
impl RefUnwindSafe for GenericBlockState
impl Send for GenericBlockState
impl Sync for GenericBlockState
impl Unpin for GenericBlockState
impl UnwindSafe for GenericBlockState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more