pub struct Beacon(pub Address);Expand description
The beacon component (3 methods).
Provided by OpenComputers’ DriverBeacon$Environment.
Tuple Fields§
§0: AddressImplementations§
Source§impl Beacon
impl Beacon
Sourcepub fn get_levels(&self) -> Result<Number>
pub fn get_levels(&self) -> Result<Number>
Get the number of levels for this beacon.
Lua: beacon.getLevels():number
Indirect call: waits for the next server tick.
Sourcepub async fn get_levels_async(&self) -> Result<Number>
pub async fn get_levels_async(&self) -> Result<Number>
Self::get_levels without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_primary_effect(&self) -> Result<OcString>
pub fn get_primary_effect(&self) -> Result<OcString>
Get the name of the active primary effect.
Lua: beacon.getPrimaryEffect():string
Indirect call: waits for the next server tick.
Sourcepub async fn get_primary_effect_async(&self) -> Result<OcString>
pub async fn get_primary_effect_async(&self) -> Result<OcString>
Self::get_primary_effect without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_secondary_effect(&self) -> Result<OcString>
pub fn get_secondary_effect(&self) -> Result<OcString>
Get the name of the active secondary effect.
Lua: beacon.getSecondaryEffect():string
Indirect call: waits for the next server tick.
Sourcepub async fn get_secondary_effect_async(&self) -> Result<OcString>
pub async fn get_secondary_effect_async(&self) -> Result<OcString>
Self::get_secondary_effect 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 Beacon
impl Component for Beacon
Source§fn from_address(address: Address) -> Self
fn from_address(address: Address) -> Self
fn address(&self) -> &Address
Source§fn at(address: impl Into<Address>) -> Option<Self>
fn at(address: impl Into<Address>) -> Option<Self>
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>>
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.