pub struct FaultHandlerSet(/* private fields */);Expand description
A bit-packed structure to store the fault handler action for all 16
possible CFDP condition codes in a single u32.
Each handler requires 2 bits to represent the 4 possible actions.
16 conditions * 2 bits/condition = 32 bits.
Implementations§
Source§impl FaultHandlerSet
impl FaultHandlerSet
Sourcepub fn new(default_handler: HandlerCode) -> Self
pub fn new(default_handler: HandlerCode) -> Self
Creates a new FaultHandlerSet where all handlers are set to the
specified default action.
Sourcepub fn set_handler(&mut self, condition: ConditionCode, handler: HandlerCode)
pub fn set_handler(&mut self, condition: ConditionCode, handler: HandlerCode)
Sets the handler for a specific condition code.
Sourcepub fn get_handler(&self, condition: ConditionCode) -> HandlerCode
pub fn get_handler(&self, condition: ConditionCode) -> HandlerCode
Gets the handler for a specific condition code.
Trait Implementations§
Source§impl Clone for FaultHandlerSet
impl Clone for FaultHandlerSet
Source§fn clone(&self) -> FaultHandlerSet
fn clone(&self) -> FaultHandlerSet
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 FaultHandlerSet
impl Debug for FaultHandlerSet
Source§impl Default for FaultHandlerSet
impl Default for FaultHandlerSet
Source§impl PartialEq for FaultHandlerSet
impl PartialEq for FaultHandlerSet
impl Copy for FaultHandlerSet
impl Eq for FaultHandlerSet
impl StructuralPartialEq for FaultHandlerSet
Auto Trait Implementations§
impl Freeze for FaultHandlerSet
impl RefUnwindSafe for FaultHandlerSet
impl Send for FaultHandlerSet
impl Sync for FaultHandlerSet
impl Unpin for FaultHandlerSet
impl UnsafeUnpin for FaultHandlerSet
impl UnwindSafe for FaultHandlerSet
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