pub struct Assembler(pub Address);Expand description
The assembler component (2 methods).
Provided by OpenComputers’ Assembler.
Tuple Fields§
§0: AddressImplementations§
Source§impl Assembler
impl Assembler
Sourcepub fn start(&self) -> Result<bool>
pub fn start(&self) -> Result<bool>
Start assembling, if possible. Returns whether assembly was started or not.
Lua: assembler.start():boolean
Indirect call: waits for the next server tick.
Sourcepub async fn start_async(&self) -> Result<bool>
pub async fn start_async(&self) -> Result<bool>
Self::start without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn status(&self) -> Result<(OcString, Value)>
pub fn status(&self) -> Result<(OcString, Value)>
The current state of the assembler, busy' or idle’, followed by the progress or template validity, respectively.
Lua: assembler.status(): string, number or boolean
Indirect call: waits for the next server tick.
Sourcepub async fn status_async(&self) -> Result<(OcString, Value)>
pub async fn status_async(&self) -> Result<(OcString, Value)>
Self::status 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 Assembler
impl Component for Assembler
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 Assembler
impl StructuralPartialEq for Assembler
Auto Trait Implementations§
impl Forget for Assembler
impl Freeze for Assembler
impl Move for Assembler
impl RefUnwindSafe for Assembler
impl Send for Assembler
impl Sync for Assembler
impl Unpin for Assembler
impl UnsafeUnpin for Assembler
impl UnwindSafe for Assembler
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