pub struct Trading(pub Address);Expand description
The trading component (1 methods).
Provided by OpenComputers’ UpgradeTrading, UpgradeTradingBase.
Tuple Fields§
§0: AddressImplementations§
Source§impl Trading
impl Trading
Sourcepub fn get_trades(&self) -> Result<Value>
pub fn get_trades(&self) -> Result<Value>
Returns a table of trades in range as userdata objects.
Lua: trading.getTrades():table
Indirect call: waits for the next server tick.
Sourcepub async fn get_trades_async(&self) -> Result<Value>
pub async fn get_trades_async(&self) -> Result<Value>
Self::get_trades 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 Trading
impl Component for Trading
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 Trading
impl StructuralPartialEq for Trading
Auto Trait Implementations§
impl Forget for Trading
impl Freeze for Trading
impl Move for Trading
impl RefUnwindSafe for Trading
impl Send for Trading
impl Sync for Trading
impl Unpin for Trading
impl UnsafeUnpin for Trading
impl UnwindSafe for Trading
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