Skip to main content

ViolationSlot

Struct ViolationSlot 

Source
#[repr(C)]
pub struct ViolationSlot { pub seq: AtomicU32, pub rule: AtomicU32, pub fqn_hash: AtomicU32, pub measured: AtomicU32, pub declared: AtomicU32, pub fqn_addr: AtomicU32, pub fqn_len: AtomicU32, }
Expand description

One slot of the SWD record. Every field is a u32 on every target, so the layout is the same on a 32-bit board and a 64-bit host.

Fields§

§seq: AtomicU32

1-based sequence number of the violation in this slot, 0 = empty. Written LAST (zeroed first), so a reader that sees a non-zero seq twice around a read of the other words has a whole entry.

§rule: AtomicU32§fqn_hash: AtomicU32

fqn_hash of the endpoint ref.

§measured: AtomicU32§declared: AtomicU32§fqn_addr: AtomicU32

Address of the endpoint ref’s bytes (exact on a 32-bit target, the low half of it on a 64-bit host) and its length: the text is in the image’s rodata, so a reader with the ELF can print the name.

§fqn_len: AtomicU32

Implementations§

Source§

impl ViolationSlot

Source

pub const fn new() -> Self

Trait Implementations§

Source§

impl Debug for ViolationSlot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ViolationSlot

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.