pub struct HmsEntry {
pub attr: u32,
pub code: u32,
}Expand description
One decoded HMS alert.
Fields§
§attr: u32§code: u32Implementations§
Source§impl HmsEntry
impl HmsEntry
pub fn new(attr: u32, code: u32) -> Self
Sourcepub fn code_string(&self) -> String
pub fn code_string(&self) -> String
Canonical code string, underscore form: HMS_0300_0100_0001_0007.
Sourcepub fn code_hyphen(&self) -> String
pub fn code_hyphen(&self) -> String
The four groups joined by hyphens (Bambu’s on-screen form):
0300-0100-0001-0007.
Sourcepub fn severity_raw(&self) -> u16
pub fn severity_raw(&self) -> u16
Raw severity value = code >> 16. Not mapped to a label: sources
conflict (pybambu 1=fatal/2=serious/3=common/4=info vs the Bambu wiki
1=Error/2=Warning/3=Info), so the bits are exposed and the label is left
to the caller.
Trait Implementations§
impl Copy for HmsEntry
impl Eq for HmsEntry
impl StructuralPartialEq for HmsEntry
Auto Trait Implementations§
impl Freeze for HmsEntry
impl RefUnwindSafe for HmsEntry
impl Send for HmsEntry
impl Sync for HmsEntry
impl Unpin for HmsEntry
impl UnsafeUnpin for HmsEntry
impl UnwindSafe for HmsEntry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.