pub struct AssemblerModule { /* private fields */ }

Implementations§

source§

impl AssemblerModule

source

pub const fn new( size: u8, symmetric: bool, build_cost: &'static [(Type, u32)] ) -> Self

Trait Implementations§

source§

impl BlockLogic for AssemblerModule

source§

fn get_size(&self) -> u8

mindustry blocks are the same width and height
source§

fn is_symmetric(&self) -> bool

source§

fn create_build_cost(&self) -> Option<ItemStorage>

source§

fn data_from_i32(&self, _: i32, _: GridPos) -> Result<DynData, DataConvertError>

source§

fn deserialize_state( &self, _: DynData ) -> Result<Option<State>, DeserializeError>

source§

fn clone_state(&self, _: &State) -> State

source§

fn mirror_state(&self, _: &mut State, _: bool, _: bool)

source§

fn rotate_state(&self, _: &mut State, _: bool)

source§

fn serialize_state(&self, _: &State) -> Result<DynData, SerializeError>

source§

fn draw( &self, name: &str, state: Option<&State>, context: Option<&RenderingContext<'_>>, rot: Rotation, scale: Scale ) -> ImageHolder

source§

fn want_context(&self) -> bool

source§

fn read( &self, build: &mut Build<'_>, reg: &BlockRegistry<'_>, entity_mapping: &EntityMapping, buff: &mut DataRead<'_> ) -> Result<(), ReadError>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.