pub struct Chunkloader(pub Address);Expand description
The chunkloader component (2 methods).
Provided by OpenComputers’ UpgradeChunkloader, UpgradeChunkloaderBase.
Tuple Fields§
§0: AddressImplementations§
Source§impl Chunkloader
impl Chunkloader
Sourcepub fn is_active(&self) -> Result<bool>
pub fn is_active(&self) -> Result<bool>
Gets whether the chunkloader is currently active.
Lua: chunkloader.isActive():boolean
Indirect call: waits for the next server tick.
Sourcepub async fn is_active_async(&self) -> Result<bool>
pub async fn is_active_async(&self) -> Result<bool>
Self::is_active without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn set_active(&self, enabled: bool) -> Result<bool>
pub fn set_active(&self, enabled: bool) -> Result<bool>
Enables or disables the chunkloader, returns true if active changed
Lua: chunkloader.setActive(enabled:boolean):boolean
Indirect call: waits for the next server tick.
Sourcepub async fn set_active_async(&self, enabled: bool) -> Result<bool>
pub async fn set_active_async(&self, enabled: bool) -> Result<bool>
Self::set_active 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 Chunkloader
impl Clone for Chunkloader
Source§impl Component for Chunkloader
impl Component for Chunkloader
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 Chunkloader
impl Debug for Chunkloader
impl Eq for Chunkloader
Source§impl Hash for Chunkloader
impl Hash for Chunkloader
Source§impl PartialEq for Chunkloader
impl PartialEq for Chunkloader
impl StructuralPartialEq for Chunkloader
Auto Trait Implementations§
impl Forget for Chunkloader
impl Freeze for Chunkloader
impl Move for Chunkloader
impl RefUnwindSafe for Chunkloader
impl Send for Chunkloader
impl Sync for Chunkloader
impl Unpin for Chunkloader
impl UnsafeUnpin for Chunkloader
impl UnwindSafe for Chunkloader
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