embassy-usb-synopsys-otg

Crates

git

Versions

default

Flavors

Skip to main content

State

Struct State 

Source
pub struct State<'d, M = CriticalSectionRawMutex, D: DmaMode = Pio>
where M: SharedRawMutex,
{ /* private fields */ }
Expand description

Type-erased borrow of StateStorage passed to OtgInstance, Driver, Bus, and on_interrupt.

Build from StateStorage::as_state.

Implementations§

Source§

impl<M, D> State<'_, M, D>
where M: SharedRawMutex, D: DmaMode,

Source

pub fn endpoint_count(&self) -> usize

Returns the number of device endpoints supported by this state.

Trait Implementations§

Source§

impl<'d, M, D> Clone for State<'d, M, D>
where M: SharedRawMutex, D: DmaMode,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<'d, M = CriticalSectionRawMutex, D = Pio> !RefUnwindSafe for State<'d, M, D>

§

impl<'d, M = CriticalSectionRawMutex, D = Pio> !UnwindSafe for State<'d, M, D>

§

impl<'d, M, D> Forget for State<'d, M, D>

§

impl<'d, M, D> Freeze for State<'d, M, D>
where M: Freeze, PhantomData<fn() -> D>: Freeze,

§

impl<'d, M, D> Move for State<'d, M, D>

§

impl<'d, M, D> Send for State<'d, M, D>
where M: Send, PhantomData<fn() -> D>: Send,

§

impl<'d, M, D> Sync for State<'d, M, D>
where M: Sync, PhantomData<fn() -> D>: Sync,

§

impl<'d, M, D> Unpin for State<'d, M, D>
where M: Unpin, PhantomData<fn() -> D>: Unpin,

§

impl<'d, M, D> UnsafeUnpin for State<'d, M, D>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 = !

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

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

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.