Skip to main content

OwnedInterruptSet

Struct OwnedInterruptSet 

Source
pub struct OwnedInterruptSet<Id, State = Dynamic>(/* private fields */);
Expand description

Has exclusive access to a set of interrupts for Id CAN peripheral. Permits safe access to the owned interrupt flags.

Implementations§

Source§

impl<Id: CanId, State> OwnedInterruptSet<Id, State>

Source

pub fn empty() -> Self

Create an empty owned set

Source

pub fn split(&mut self, subset: InterruptSet) -> Result<Self, MaskError>

Moves ownership of the interrupts described by subset from self to the return value. If self does not contain subset, an error is returned.

Source

pub fn join(&mut self, other: Self)

Assume ownership of the interrupts in other.

Source§

impl<Id: CanId, State: MaybeEnabled> OwnedInterruptSet<Id, State>

Source

pub fn split_flagged(&mut self) -> Self

Moves ownership of the interrupts that were flagged to the return value.

Source

pub fn iter_flagged(&self) -> Iter

Clears the flagged interrupts owned by this OwnedInterruptSet and provides an iterator over the flags that were cleared.

Source

pub fn interrupt_flags(&self) -> InterruptSet

Get the subset of interrupts in this set that are currently flagged.

Source

pub fn clear_interrupts(&self, interrupts: InterruptSet)

Clear the indicated interrupts. Interrupts not owned by this OwnedInterruptSet are silently ignored.

Trait Implementations§

Source§

impl<Id: CanId, State> Default for OwnedInterruptSet<Id, State>

Source§

fn default() -> Self

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

impl<Id: CanId, State: Static> From<OwnedInterruptSet<Id, State>> for OwnedInterruptSet<Id>

Source§

fn from(value: OwnedInterruptSet<Id, State>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<Id, State> Freeze for OwnedInterruptSet<Id, State>

§

impl<Id, State> RefUnwindSafe for OwnedInterruptSet<Id, State>
where Id: RefUnwindSafe, State: RefUnwindSafe,

§

impl<Id, State> Send for OwnedInterruptSet<Id, State>
where Id: Send, State: Send,

§

impl<Id, State> Sync for OwnedInterruptSet<Id, State>
where Id: Sync, State: Sync,

§

impl<Id, State> Unpin for OwnedInterruptSet<Id, State>
where Id: Unpin, State: Unpin,

§

impl<Id, State> UnsafeUnpin for OwnedInterruptSet<Id, State>

§

impl<Id, State> UnwindSafe for OwnedInterruptSet<Id, State>
where Id: UnwindSafe, State: UnwindSafe,

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> Same for T

Source§

type Output = T

Should always be Self
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.