pub struct Crafting(pub Address);Expand description
The crafting component (1 methods).
Provided by OpenComputers’ UpgradeCrafting, UpgradeCraftingBase.
Tuple Fields§
§0: AddressImplementations§
Source§impl Crafting
impl Crafting
Sourcepub fn craft(&self, count: Option<Number>) -> Result<Number>
pub fn craft(&self, count: Option<Number>) -> Result<Number>
Tries to craft the specified number of items in the top left area of the inventory.
Lua: crafting.craft([count:number]):number
Indirect call: waits for the next server tick.
Sourcepub async fn craft_async(&self, count: Option<Number>) -> Result<Number>
pub async fn craft_async(&self, count: Option<Number>) -> Result<Number>
Self::craft without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Trait Implementations§
Source§impl Component for Crafting
impl Component for Crafting
Source§fn from_address(address: Address) -> Self
fn from_address(address: Address) -> Self
Wraps an address without checking what is there.
fn address(&self) -> &Address
Source§fn at(address: impl Into<Address>) -> Option<Self>
fn at(address: impl Into<Address>) -> Option<Self>
The component at
address, if it is of this type.Source§fn invoke(&self, method: &str, args: Vec<Value>) -> Result<Vec<Value>>
fn invoke(&self, method: &str, args: Vec<Value>) -> Result<Vec<Value>>
An untyped call, for methods the wrapper doesn’t know.
Source§fn invoke_async(&self, method: &str, args: Vec<Value>) -> Call ⓘ
fn invoke_async(&self, method: &str, args: Vec<Value>) -> Call ⓘ
Component::invoke without blocking; see invoke_async.impl Eq for Crafting
impl StructuralPartialEq for Crafting
Auto Trait Implementations§
impl Forget for Crafting
impl Freeze for Crafting
impl Move for Crafting
impl RefUnwindSafe for Crafting
impl Send for Crafting
impl Sync for Crafting
impl Unpin for Crafting
impl UnsafeUnpin for Crafting
impl UnwindSafe for Crafting
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