pub struct Sign(pub Address);Expand description
The sign component (2 methods).
Provided by OpenComputers’ UpgradeSignInAdapter, UpgradeSignInRotatable.
Tuple Fields§
§0: AddressImplementations§
Source§impl Sign
impl Sign
Sourcepub fn get_value(&self, side: impl Into<Number>) -> Result<OcString>
pub fn get_value(&self, side: impl Into<Number>) -> Result<OcString>
Get the text on the sign on the specified side of the adapter.
Lua: sign.getValue(side:number):string
Indirect call: waits for the next server tick.
Sourcepub async fn get_value_async(&self, side: impl Into<Number>) -> Result<OcString>
pub async fn get_value_async(&self, side: impl Into<Number>) -> Result<OcString>
Self::get_value without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn set_value(
&self,
side: impl Into<Number>,
value: impl AsRef<[u8]>,
) -> Result<OcString>
pub fn set_value( &self, side: impl Into<Number>, value: impl AsRef<[u8]>, ) -> Result<OcString>
Set the text on the sign on the specified side of the adapter.
Lua: sign.setValue(side:number, value:string):string
Indirect call: waits for the next server tick.
Sourcepub async fn set_value_async(
&self,
side: impl Into<Number>,
value: impl AsRef<[u8]>,
) -> Result<OcString>
pub async fn set_value_async( &self, side: impl Into<Number>, value: impl AsRef<[u8]>, ) -> Result<OcString>
Self::set_value 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 Sign
impl Component for Sign
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 Sign
impl StructuralPartialEq for Sign
Auto Trait Implementations§
impl Forget for Sign
impl Freeze for Sign
impl Move for Sign
impl RefUnwindSafe for Sign
impl Send for Sign
impl Sync for Sign
impl Unpin for Sign
impl UnsafeUnpin for Sign
impl UnwindSafe for Sign
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