pub struct MemoryStats { /* private fields */ }Expand description
Memory usage statistics
Implementations§
Source§impl MemoryStats
impl MemoryStats
pub fn wasm_memory(&self) -> usize
pub fn gpu_memory(&self) -> usize
pub fn peak_gpu_memory(&self) -> usize
pub fn used_mb(&self) -> f32
pub fn limit_mb(&self) -> f32
Trait Implementations§
Source§impl Clone for MemoryStats
impl Clone for MemoryStats
Source§fn clone(&self) -> MemoryStats
fn clone(&self) -> MemoryStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryStats
impl Debug for MemoryStats
Source§impl From<MemoryStats> for JsValue
impl From<MemoryStats> for JsValue
Source§fn from(value: MemoryStats) -> Self
fn from(value: MemoryStats) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for MemoryStats
impl FromWasmAbi for MemoryStats
Source§impl IntoWasmAbi for MemoryStats
impl IntoWasmAbi for MemoryStats
Source§impl LongRefFromWasmAbi for MemoryStats
impl LongRefFromWasmAbi for MemoryStats
Source§impl OptionFromWasmAbi for MemoryStats
impl OptionFromWasmAbi for MemoryStats
Source§impl OptionIntoWasmAbi for MemoryStats
impl OptionIntoWasmAbi for MemoryStats
Source§impl RefFromWasmAbi for MemoryStats
impl RefFromWasmAbi for MemoryStats
Source§type Anchor = RcRef<MemoryStats>
type Anchor = RcRef<MemoryStats>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for MemoryStats
impl RefMutFromWasmAbi for MemoryStats
Source§impl TryFromJsValue for MemoryStats
impl TryFromJsValue for MemoryStats
Source§impl VectorFromWasmAbi for MemoryStats
impl VectorFromWasmAbi for MemoryStats
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[MemoryStats]>
Source§impl VectorIntoWasmAbi for MemoryStats
impl VectorIntoWasmAbi for MemoryStats
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[MemoryStats]>) -> Self::Abi
Source§impl WasmDescribeVector for MemoryStats
impl WasmDescribeVector for MemoryStats
impl SupportsConstructor for MemoryStats
impl SupportsInstanceProperty for MemoryStats
impl SupportsStaticProperty for MemoryStats
Auto Trait Implementations§
impl Freeze for MemoryStats
impl RefUnwindSafe for MemoryStats
impl Send for MemoryStats
impl Sync for MemoryStats
impl Unpin for MemoryStats
impl UnsafeUnpin for MemoryStats
impl UnwindSafe for MemoryStats
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<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.