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