pub struct Locked<'invoker, 'buffer, B: Buffer> { /* private fields */ }
Expand description

An assembler component on which methods can be invoked.

This type combines an assembler address, an Invoker that can be used to make method calls, and a scratch buffer used to perform CBOR encoding and decoding. A value of this type can be created by calling Assembler::lock, and it can be dropped to return the borrow of the invoker and buffer to the caller so they can be reused for other purposes.

The 'invoker lifetime is the lifetime of the invoker. The 'buffer lifetime is the lifetime of the buffer. The B type is the type of scratch buffer to use.

Implementations

Returns whether all ingredients (both solid and fluid) required to craft the specified recipe are present in the assembler.

Errors

Returns the recipe in a specified slot.

Errors

Checks whether a recipe is properly configured.

A recipe is defined as being “properly configured” if it produces any kind of output.

Errors

Returns a tank.

Errors

Returns the maximum amount of energy the assembler’s internal buffer can hold.

Errors

Returns the amount of energy stored in the assembler’s internal buffer.

Errors

Returns the item in the specified storage slot.

Errors

Returns the item in the output slot of a recipe.

Errors

Enables or disables computer control of the assembler.

If enable is true, the assembler runs or stops each recipe based on the most recent call to set_enabled. If enable is false, the assembler runs or stops based on the redstone signal at the control port.

Whenever this function is called with enable set to true, whether or not the assembler was previously under computer control, all recipes are enabled. It is necessary to immediately call set_enabled to disable recipes if that is not desired.

Errors

Enables or disables a recipe.

This should only be called if the assembler is under computer control via a preceding call to enable_computer_control. If that is not the case, the call will succeed but have no effect.

Errors

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.