pub struct Gauge<S = String> {
pub entity: S,
pub max: Option<S>,
pub caption: Option<S>,
pub color: Option<RgbColor>,
}Expand description
Displays an MXP entity value as a gauge.
See MXP specification: <GAUGE>.
§Examples
use mxp::RgbColor;
assert_eq!(
"<GAUGE Hp MAX=HpMax CAPTION=Health COLOR=red>".parse::<mxp::Gauge>(),
Ok(mxp::Gauge {
entity: "Hp".into(),
max: Some("HpMax".into()),
caption: Some("Health".into()),
color: Some(RgbColor::hex(0xFF0000)),
}),
);Fields§
§entity: SName of the entity to use as gauge data.
max: Option<S>Name of the entity to use for the maximum value of the gauge.
caption: Option<S>Optional text to display on the gauge.
color: Option<RgbColor>Color of the gauge bar.
Implementations§
Trait Implementations§
impl<S: Copy> Copy for Gauge<S>
impl<S: Eq> Eq for Gauge<S>
impl<S> StructuralPartialEq for Gauge<S>
Auto Trait Implementations§
impl<S> Freeze for Gauge<S>where
S: Freeze,
impl<S> RefUnwindSafe for Gauge<S>where
S: RefUnwindSafe,
impl<S> Send for Gauge<S>where
S: Send,
impl<S> Sync for Gauge<S>where
S: Sync,
impl<S> Unpin for Gauge<S>where
S: Unpin,
impl<S> UnsafeUnpin for Gauge<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Gauge<S>where
S: UnwindSafe,
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