pub struct ResourceSample {
pub time_ms: u32,
pub resource_name: String,
pub current: f64,
pub max: f64,
pub gain: f64,
pub loss: f64,
}Expand description
One 100ms-bucketed resource sample.
Fields§
§time_ms: u32§resource_name: String§current: f64§max: f64§gain: f64§loss: f64Trait Implementations§
Source§impl Clone for ResourceSample
impl Clone for ResourceSample
Source§fn clone(&self) -> ResourceSample
fn clone(&self) -> ResourceSample
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 ResourceSample
impl Debug for ResourceSample
Source§impl From<ResourceSample> for JsValuewhere
ResourceSample: Serialize,
impl From<ResourceSample> for JsValuewhere
ResourceSample: Serialize,
Source§fn from(value: ResourceSample) -> Self
fn from(value: ResourceSample) -> Self
Converts to this type from the input type.
Source§impl IntoWasmAbi for &ResourceSamplewhere
ResourceSample: Serialize,
impl IntoWasmAbi for &ResourceSamplewhere
ResourceSample: Serialize,
Source§impl IntoWasmAbi for ResourceSamplewhere
ResourceSample: Serialize,
impl IntoWasmAbi for ResourceSamplewhere
ResourceSample: Serialize,
Source§impl OptionIntoWasmAbi for ResourceSamplewhere
ResourceSample: Serialize,
impl OptionIntoWasmAbi for ResourceSamplewhere
ResourceSample: Serialize,
Source§impl Serialize for ResourceSample
impl Serialize for ResourceSample
Source§impl Tsify for ResourceSample
impl Tsify for ResourceSample
const DECL: &'static str = "/**\n * One 100ms-bucketed resource sample.\n */\nexport interface ResourceSample {\n timeMs: number;\n resourceName: string;\n current: number;\n max: number;\n gain: number;\n loss: number;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
Source§impl VectorIntoWasmAbi for ResourceSamplewhere
ResourceSample: Serialize,
impl VectorIntoWasmAbi for ResourceSamplewhere
ResourceSample: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribe for ResourceSample
impl WasmDescribe for ResourceSample
Auto Trait Implementations§
impl Freeze for ResourceSample
impl RefUnwindSafe for ResourceSample
impl Send for ResourceSample
impl Sync for ResourceSample
impl Unpin for ResourceSample
impl UnsafeUnpin for ResourceSample
impl UnwindSafe for ResourceSample
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
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.