pub struct ResourceView {
pub resource_type: u32,
pub gained: f64,
pub spent: f64,
pub wasted: f64,
pub time_at_cap_ms: u64,
pub starved_time_ms: u64,
pub cap_pct: Option<f64>,
pub starved_pct: Option<f64>,
}Expand description
Per-resource flow: gained, spent, wasted, and time spent at cap or starved.
Fields§
§resource_type: u32§gained: f64§spent: f64§wasted: f64§time_at_cap_ms: u64§starved_time_ms: u64§cap_pct: Option<f64>§starved_pct: Option<f64>Trait Implementations§
Source§impl Clone for ResourceView
impl Clone for ResourceView
Source§fn clone(&self) -> ResourceView
fn clone(&self) -> ResourceView
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 ResourceView
impl Debug for ResourceView
Source§impl Serialize for ResourceView
impl Serialize for ResourceView
Source§impl Tsify for ResourceView
impl Tsify for ResourceView
const DECL: &'static str = "/**\n * Per-resource flow: gained, spent, wasted, and time spent at cap or starved.\n */\nexport interface ResourceView {\n resource_type: number;\n gained: number;\n spent: number;\n wasted: number;\n time_at_cap_ms: number;\n starved_time_ms: number;\n cap_pct: number | undefined;\n starved_pct: number | undefined;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
Auto Trait Implementations§
impl Freeze for ResourceView
impl RefUnwindSafe for ResourceView
impl Send for ResourceView
impl Sync for ResourceView
impl Unpin for ResourceView
impl UnsafeUnpin for ResourceView
impl UnwindSafe for ResourceView
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