pub struct TractorBeam(pub Address);Expand description
The tractor_beam component (1 methods).
Provided by OpenComputers’ UpgradeTractorBeam$Common, UpgradeTractorBeam$Drone, UpgradeTractorBeam$Player.
Tuple Fields§
§0: AddressImplementations§
Source§impl TractorBeam
impl TractorBeam
Sourcepub fn suck(&self) -> Result<bool>
pub fn suck(&self) -> Result<bool>
Tries to pick up a random item in the robots’ vicinity.
Lua: tractor_beam.suck():boolean
Indirect call: waits for the next server tick.
Sourcepub async fn suck_async(&self) -> Result<bool>
pub async fn suck_async(&self) -> Result<bool>
Self::suck without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Trait Implementations§
Source§impl Clone for TractorBeam
impl Clone for TractorBeam
Source§impl Component for TractorBeam
impl Component for TractorBeam
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.Source§impl Debug for TractorBeam
impl Debug for TractorBeam
impl Eq for TractorBeam
Source§impl Hash for TractorBeam
impl Hash for TractorBeam
Source§impl PartialEq for TractorBeam
impl PartialEq for TractorBeam
impl StructuralPartialEq for TractorBeam
Auto Trait Implementations§
impl Forget for TractorBeam
impl Freeze for TractorBeam
impl Move for TractorBeam
impl RefUnwindSafe for TractorBeam
impl Send for TractorBeam
impl Sync for TractorBeam
impl Unpin for TractorBeam
impl UnsafeUnpin for TractorBeam
impl UnwindSafe for TractorBeam
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