pub struct MachineNotEmptyError<M> {
pub machine: M,
pub resource_type: &'static str,
pub amount: u32,
pub location: BufferLocation,
}Expand description
Error returned when trying to change a machine’s recipe while it has non-empty input or output buffers.
Fields§
§machine: MReturning the machine with the original recipe.
resource_type: &'static strName of the type of the resource in the machine’s buffers.
amount: u32The amount of the resource in the machine’s buffers.
location: BufferLocationWhether the resource is in the input or the output.
Implementations§
Source§impl<M> MachineNotEmptyError<M>
impl<M> MachineNotEmptyError<M>
Sourcepub fn map_machine<F, M2>(self, f: F) -> MachineNotEmptyError<M2>where
F: FnOnce(M) -> M2,
pub fn map_machine<F, M2>(self, f: F) -> MachineNotEmptyError<M2>where
F: FnOnce(M) -> M2,
Converts the error to another machine type, keeping the same resource information.
Trait Implementations§
Source§impl<M: Debug> Debug for MachineNotEmptyError<M>
impl<M: Debug> Debug for MachineNotEmptyError<M>
Auto Trait Implementations§
impl<M> Freeze for MachineNotEmptyError<M>where
M: Freeze,
impl<M> RefUnwindSafe for MachineNotEmptyError<M>where
M: RefUnwindSafe,
impl<M> Send for MachineNotEmptyError<M>where
M: Send,
impl<M> Sync for MachineNotEmptyError<M>where
M: Sync,
impl<M> Unpin for MachineNotEmptyError<M>where
M: Unpin,
impl<M> UnwindSafe for MachineNotEmptyError<M>where
M: UnwindSafe,
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