Skip to main content Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. Rust
  4. pw_kernel
  5. kernel
  6. PreemptDisableGuard

PreemptDisableGuard

Struct PreemptDisableGuard 

Source
pub struct PreemptDisableGuard<K: Kernel>(K);

Tuple Fields§

§0: K

Implementations§

Source§

impl<K: Kernel> PreemptDisableGuard<K>

Source

pub fn new(kernel: K) -> Self

Source

pub(crate) unsafe fn adopt_locked(kernel: K) -> Self

Reconstructs a PreemptDisableGuard when preemption is already disabled.

§Safety

preempt_disable_count must already be >= 1 for an active guard whose ownership was transferred to this context.

Trait Implementations§

Source§

impl<K: Kernel> Drop for PreemptDisableGuard<K>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<K> Forget for PreemptDisableGuard<K>

§

impl<K> Freeze for PreemptDisableGuard<K>
where K: Freeze,

§

impl<K> Move for PreemptDisableGuard<K>

§

impl<K> RefUnwindSafe for PreemptDisableGuard<K>
where K: RefUnwindSafe,

§

impl<K> Send for PreemptDisableGuard<K>
where K: Send,

§

impl<K> Sync for PreemptDisableGuard<K>

§

impl<K> Unpin for PreemptDisableGuard<K>
where K: Unpin,

§

impl<K> UnsafeUnpin for PreemptDisableGuard<K>
where K: UnsafeUnpin,

§

impl<K> UnwindSafe for PreemptDisableGuard<K>
where K: UnwindSafe,

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

fn cast_into(self) -> U

§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.