pub struct CopperBulb {
pub lit: bool,
pub powered: bool,
}Fields§
§lit: bool§powered: boolTrait Implementations§
Source§impl BlockTrait for CopperBulb
impl BlockTrait for CopperBulb
Source§fn boxed(&self) -> Box<dyn BlockTrait>
fn boxed(&self) -> Box<dyn BlockTrait>
Convert the block struct to a boxed trait object.
Source§fn behavior(&self) -> BlockBehavior
fn behavior(&self) -> BlockBehavior
Get the
BlockBehavior of this block.Source§fn as_block_state(&self) -> BlockState
fn as_block_state(&self) -> BlockState
Convert the block struct to a
BlockState. Read moreSource§fn property_map(&self) -> HashMap<&'static str, &'static str>
fn property_map(&self) -> HashMap<&'static str, &'static str>
Returns a map of property names on this block to their values as
strings. Read more
Source§fn get_property(&self, name: &str) -> Option<&'static str>
fn get_property(&self, name: &str) -> Option<&'static str>
Get a property’s value as a string by its name, or
None if the block
has no property with that name. Read moreSource§fn set_property(
&mut self,
name: &str,
new_value: &str,
) -> Result<(), InvalidPropertyError>
fn set_property( &mut self, name: &str, new_value: &str, ) -> Result<(), InvalidPropertyError>
Update a property on this block, with the name and value being strings. Read more
Source§impl Clone for CopperBulb
impl Clone for CopperBulb
impl Copy for CopperBulb
Source§impl Debug for CopperBulb
impl Debug for CopperBulb
Source§impl Default for CopperBulb
impl Default for CopperBulb
Source§impl From<CopperBulb> for BlockState
impl From<CopperBulb> for BlockState
Source§fn from(b: CopperBulb) -> Self
fn from(b: CopperBulb) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CopperBulb
impl PartialEq for CopperBulb
impl StructuralPartialEq for CopperBulb
Auto Trait Implementations§
impl Freeze for CopperBulb
impl RefUnwindSafe for CopperBulb
impl Send for CopperBulb
impl Sync for CopperBulb
impl Unpin for CopperBulb
impl UnsafeUnpin for CopperBulb
impl UnwindSafe for CopperBulb
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