pub struct Tablet(pub Address);Expand description
The tablet component (2 methods).
Provided by OpenComputers’ Tablet.
Tuple Fields§
§0: AddressImplementations§
Source§impl Tablet
impl Tablet
Sourcepub fn get_pitch(&self) -> Result<Number>
pub fn get_pitch(&self) -> Result<Number>
Gets the pitch of the player holding the tablet.
Lua: tablet.getPitch():number
Indirect call: waits for the next server tick.
Sourcepub async fn get_pitch_async(&self) -> Result<Number>
pub async fn get_pitch_async(&self) -> Result<Number>
Self::get_pitch without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn get_yaw(&self) -> Result<Number>
pub fn get_yaw(&self) -> Result<Number>
Gets the yaw of the player holding the tablet.
Lua: tablet.getYaw():number
Indirect call: waits for the next server tick.
Sourcepub async fn get_yaw_async(&self) -> Result<Number>
pub async fn get_yaw_async(&self) -> Result<Number>
Self::get_yaw 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 Tablet
impl Component for Tablet
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 Tablet
impl StructuralPartialEq for Tablet
Auto Trait Implementations§
impl Forget for Tablet
impl Freeze for Tablet
impl Move for Tablet
impl RefUnwindSafe for Tablet
impl Send for Tablet
impl Sync for Tablet
impl Unpin for Tablet
impl UnsafeUnpin for Tablet
impl UnwindSafe for Tablet
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