pub struct MiraHandle<T: Any + ?Sized> { /* private fields */ }Expand description
A compact, runtime-checked handle to an arena-managed value.
Implementations§
Source§impl<T: MiraArray + ?Sized> MiraHandle<T>
impl<T: MiraArray + ?Sized> MiraHandle<T>
Sourcepub const fn erase_array(self) -> MiraHandle<dyn MiraArray>
pub const fn erase_array(self) -> MiraHandle<dyn MiraArray>
Erase the concrete Rust type while preserving its MiraScript category.
Source§impl<T: MiraRecord + ?Sized> MiraHandle<T>
impl<T: MiraRecord + ?Sized> MiraHandle<T>
Sourcepub const fn erase_record(self) -> MiraHandle<dyn MiraRecord>
pub const fn erase_record(self) -> MiraHandle<dyn MiraRecord>
Erase the concrete Rust type while preserving its MiraScript category.
Source§impl<T: MiraFunction + ?Sized> MiraHandle<T>
impl<T: MiraFunction + ?Sized> MiraHandle<T>
Sourcepub const fn erase_function(self) -> MiraHandle<dyn MiraFunction>
pub const fn erase_function(self) -> MiraHandle<dyn MiraFunction>
Erase the concrete Rust type while preserving its MiraScript category.
Source§impl<T: MiraModule + ?Sized> MiraHandle<T>
impl<T: MiraModule + ?Sized> MiraHandle<T>
Sourcepub const fn erase_module(self) -> MiraHandle<dyn MiraModule>
pub const fn erase_module(self) -> MiraHandle<dyn MiraModule>
Erase the concrete Rust type while preserving its MiraScript category.
Source§impl MiraHandle<dyn MiraArray>
impl MiraHandle<dyn MiraArray>
Source§impl MiraHandle<dyn MiraFunction>
impl MiraHandle<dyn MiraFunction>
Source§impl MiraHandle<dyn MiraModule>
impl MiraHandle<dyn MiraModule>
Sourcepub fn len(self, runtime: &Runtime) -> Result<usize>
pub fn len(self, runtime: &Runtime) -> Result<usize>
Return the number of exports in the module.
Sourcepub fn index_of(self, runtime: &Runtime, key: &str) -> Result<Option<usize>>
pub fn index_of(self, runtime: &Runtime, key: &str) -> Result<Option<usize>>
Find an export’s iteration index of the module.
Source§impl MiraHandle<dyn MiraRecord>
impl MiraHandle<dyn MiraRecord>
Sourcepub fn len(self, runtime: &Runtime) -> Result<usize>
pub fn len(self, runtime: &Runtime) -> Result<usize>
Return the number of fields in the record.
Sourcepub fn index_of(self, runtime: &Runtime, key: &str) -> Result<Option<usize>>
pub fn index_of(self, runtime: &Runtime, key: &str) -> Result<Option<usize>>
Find a field’s iteration index of the record.
Sourcepub fn index_of_i(self, runtime: &Runtime, key: u32) -> Result<Option<usize>>
pub fn index_of_i(self, runtime: &Runtime, key: u32) -> Result<Option<usize>>
Find an integer field key’s iteration index of the record without allocating when possible.
Trait Implementations§
impl<T: Any + ?Sized> Copy for MiraHandle<T>
impl<T: Any + ?Sized> Eq for MiraHandle<T>
Source§impl From<MiraHandle<String>> for MiraValue
impl From<MiraHandle<String>> for MiraValue
Source§fn from(value: MiraHandle<String>) -> Self
fn from(value: MiraHandle<String>) -> Self
Converts to this type from the input type.
Source§impl From<MiraHandle<dyn MiraArray>> for MiraValue
impl From<MiraHandle<dyn MiraArray>> for MiraValue
Source§fn from(value: MiraHandle<dyn MiraArray>) -> Self
fn from(value: MiraHandle<dyn MiraArray>) -> Self
Converts to this type from the input type.
Source§impl From<MiraHandle<dyn MiraFunction>> for MiraValue
impl From<MiraHandle<dyn MiraFunction>> for MiraValue
Source§fn from(value: MiraHandle<dyn MiraFunction>) -> Self
fn from(value: MiraHandle<dyn MiraFunction>) -> Self
Converts to this type from the input type.
Source§impl From<MiraHandle<dyn MiraModule>> for MiraValue
impl From<MiraHandle<dyn MiraModule>> for MiraValue
Source§fn from(value: MiraHandle<dyn MiraModule>) -> Self
fn from(value: MiraHandle<dyn MiraModule>) -> Self
Converts to this type from the input type.
Source§impl From<MiraHandle<dyn MiraRecord>> for MiraValue
impl From<MiraHandle<dyn MiraRecord>> for MiraValue
Source§fn from(value: MiraHandle<dyn MiraRecord>) -> Self
fn from(value: MiraHandle<dyn MiraRecord>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for MiraHandle<T>
impl<T> RefUnwindSafe for MiraHandle<T>
impl<T> Send for MiraHandle<T>
impl<T> Sync for MiraHandle<T>
impl<T> Unpin for MiraHandle<T>
impl<T> UnsafeUnpin for MiraHandle<T>
impl<T> UnwindSafe for MiraHandle<T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.