Trait r3_kernel::utils::Init

source ·
pub trait Init {
    const INIT: Self;
}
Expand description

Trait for types having a constant default value. This is essentially a constant version of Default.

This trait is subject to the application-side API stability guarantee.

Required Associated Constants§

source

const INIT: Self

The default value.

Implementations on Foreign Types§

source§

impl Init for u32

source§

const INIT: u32 = 0u32

source§

impl Init for AtomicI32

source§

const INIT: AtomicI32 = atomic::AtomicI32::new(0)

source§

impl<T> Init for Cell<T>where T: Init,

source§

const INIT: Cell<T> = Cell::new(T::INIT)

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> Init for (A, B, C, D, E, F, G, H, I, J, K, L)where A: Init, B: Init, C: Init, D: Init, E: Init, F: Init, G: Init, H: Init, I: Init, J: Init, K: Init, L: Init,

source§

const INIT: (A, B, C, D, E, F, G, H, I, J, K, L) = (A::INIT, B::INIT, C::INIT, D::INIT, E::INIT, F::INIT, G::INIT, H::INIT, I::INIT, J::INIT, K::INIT, L::INIT)

source§

impl Init for u64

source§

const INIT: u64 = 0u64

source§

impl Init for AtomicUsize

source§

const INIT: AtomicUsize = atomic::AtomicUsize::new(0)

source§

impl Init for u16

source§

const INIT: u16 = 0u16

source§

impl Init for i8

source§

const INIT: i8 = 0i8

source§

impl<G, H, I, J, K, L> Init for (G, H, I, J, K, L)where G: Init, H: Init, I: Init, J: Init, K: Init, L: Init,

source§

const INIT: (G, H, I, J, K, L) = (G::INIT, H::INIT, I::INIT, J::INIT, K::INIT, L::INIT)

source§

impl<T> Init for PhantomData<T>where T: ?Sized,

source§

const INIT: PhantomData<T> = PhantomData

source§

impl<L> Init for (L,)where L: Init,

source§

const INIT: (L,) = (L::INIT,)

source§

impl Init for AtomicIsize

source§

const INIT: AtomicIsize = atomic::AtomicIsize::new(0)

source§

impl<F, G, H, I, J, K, L> Init for (F, G, H, I, J, K, L)where F: Init, G: Init, H: Init, I: Init, J: Init, K: Init, L: Init,

source§

const INIT: (F, G, H, I, J, K, L) = (F::INIT, G::INIT, H::INIT, I::INIT, J::INIT, K::INIT, L::INIT)

source§

impl<T> Init for MaybeUninit<T>

source§

const INIT: MaybeUninit<T> = mem::MaybeUninit::uninit()

source§

impl<B, C, D, E, F, G, H, I, J, K, L> Init for (B, C, D, E, F, G, H, I, J, K, L)where B: Init, C: Init, D: Init, E: Init, F: Init, G: Init, H: Init, I: Init, J: Init, K: Init, L: Init,

source§

const INIT: (B, C, D, E, F, G, H, I, J, K, L) = (B::INIT, C::INIT, D::INIT, E::INIT, F::INIT, G::INIT, H::INIT, I::INIT, J::INIT, K::INIT, L::INIT)

source§

impl<T> Init for RefCell<T>where T: Init,

source§

const INIT: RefCell<T> = RefCell::new(T::INIT)

source§

impl Init for ()

source§

const INIT: () = ()

source§

impl Init for i32

source§

const INIT: i32 = 0i32

source§

impl<T> Init for Option<T>

source§

const INIT: Option<T> = None

source§

impl<K, L> Init for (K, L)where K: Init, L: Init,

source§

const INIT: (K, L) = (K::INIT, L::INIT)

source§

impl Init for AtomicI16

source§

const INIT: AtomicI16 = atomic::AtomicI16::new(0)

source§

impl<C, D, E, F, G, H, I, J, K, L> Init for (C, D, E, F, G, H, I, J, K, L)where C: Init, D: Init, E: Init, F: Init, G: Init, H: Init, I: Init, J: Init, K: Init, L: Init,

source§

const INIT: (C, D, E, F, G, H, I, J, K, L) = (C::INIT, D::INIT, E::INIT, F::INIT, G::INIT, H::INIT, I::INIT, J::INIT, K::INIT, L::INIT)

source§

impl Init for i128

source§

const INIT: i128 = 0i128

source§

impl Init for i64

source§

const INIT: i64 = 0i64

source§

impl Init for f64

source§

const INIT: f64 = 0f64

source§

impl Init for char

source§

const INIT: char = '\0'

source§

impl<T> Init for ManuallyDrop<T>where T: Init,

source§

const INIT: ManuallyDrop<T> = mem::ManuallyDrop::new(T::INIT)

source§

impl<T, I> Init for UnsyncTokenLock<T, I>where T: Init, I: Init,

source§

const INIT: UnsyncTokenLock<T, I> = Self::new(I::INIT, T::INIT)

source§

impl Init for AtomicU8

source§

const INIT: AtomicU8 = atomic::AtomicU8::new(0)

source§

impl<T, I> Init for TokenLock<T, I>where T: Init, I: Init,

source§

const INIT: TokenLock<T, I> = Self::new(I::INIT, T::INIT)

source§

impl Init for i16

source§

const INIT: i16 = 0i16

source§

impl Init for u128

source§

const INIT: u128 = 0u128

source§

impl<T, const N: usize> Init for ArrayVec<T, N>

source§

const INIT: ArrayVec<T, N> = Self::new_const()

source§

impl Init for AtomicU64

source§

const INIT: AtomicU64 = atomic::AtomicU64::new(0)

source§

impl Init for AtomicBool

source§

const INIT: AtomicBool = atomic::AtomicBool::new(false)

source§

impl Init for bool

source§

const INIT: bool = false

source§

impl Init for AtomicI64

source§

const INIT: AtomicI64 = atomic::AtomicI64::new(0)

source§

impl Init for f32

source§

const INIT: f32 = 0f32

source§

impl<T> Init for AtomicPtr<T>

source§

const INIT: AtomicPtr<T> = atomic::AtomicPtr::new(core::ptr::null_mut())

source§

impl Init for usize

source§

const INIT: usize = 0usize

source§

impl Init for &str

source§

const INIT: &str = ""

source§

impl<T> Init for UnsafeCell<T>where T: Init,

source§

const INIT: UnsafeCell<T> = UnsafeCell::new(T::INIT)

source§

impl<J, K, L> Init for (J, K, L)where J: Init, K: Init, L: Init,

source§

const INIT: (J, K, L) = (J::INIT, K::INIT, L::INIT)

source§

impl Init for AtomicI8

source§

const INIT: AtomicI8 = atomic::AtomicI8::new(0)

source§

impl Init for u8

source§

const INIT: u8 = 0u8

source§

impl<D, E, F, G, H, I, J, K, L> Init for (D, E, F, G, H, I, J, K, L)where D: Init, E: Init, F: Init, G: Init, H: Init, I: Init, J: Init, K: Init, L: Init,

source§

const INIT: (D, E, F, G, H, I, J, K, L) = (D::INIT, E::INIT, F::INIT, G::INIT, H::INIT, I::INIT, J::INIT, K::INIT, L::INIT)

source§

impl Init for isize

source§

const INIT: isize = 0isize

source§

impl<T> Init for &[T]where T: 'static,

source§

const INIT: &[T] = &[]

source§

impl<Tag> Init for SingletonTokenId<Tag>where Tag: ?Sized,

source§

const INIT: SingletonTokenId<Tag> = Self::new()

source§

impl<I, J, K, L> Init for (I, J, K, L)where I: Init, J: Init, K: Init, L: Init,

source§

const INIT: (I, J, K, L) = (I::INIT, J::INIT, K::INIT, L::INIT)

source§

impl Init for AtomicU16

source§

const INIT: AtomicU16 = atomic::AtomicU16::new(0)

source§

impl Init for AtomicU32

source§

const INIT: AtomicU32 = atomic::AtomicU32::new(0)

source§

impl<H, I, J, K, L> Init for (H, I, J, K, L)where H: Init, I: Init, J: Init, K: Init, L: Init,

source§

const INIT: (H, I, J, K, L) = (H::INIT, I::INIT, J::INIT, K::INIT, L::INIT)

source§

impl<T, const LEN: usize> Init for [T; LEN]where T: Init,

source§

const INIT: [T; LEN] = { let mut array = mem::MaybeUninit::uninit_array(); { let _t = match #[lang = "into_iter"](#[lang = "Range"]{ start: 0, end: LEN,}) { mut iter => loop { match #[lang = "next"](&mut iter) { #[lang = "None"] {} => break, #[lang = "Some"] { 0: i } => { array[i] = mem::MaybeUninit::new(T::INIT); } } }, }; _t }; unsafe { mem::MaybeUninit::array_assume_init(array) } }

source§

impl<E, F, G, H, I, J, K, L> Init for (E, F, G, H, I, J, K, L)where E: Init, F: Init, G: Init, H: Init, I: Init, J: Init, K: Init, L: Init,

source§

const INIT: (E, F, G, H, I, J, K, L) = (E::INIT, F::INIT, G::INIT, H::INIT, I::INIT, J::INIT, K::INIT, L::INIT)

Implementors§

source§

impl Init for Closure

source§

const INIT: Closure = (|| { }).into_closure_const()

source§

impl Init for ClosureEnv

source§

const INIT: ClosureEnv = Self(None)

source§

impl Init for Duration

source§

const INIT: Duration = Self::ZERO

source§

impl Init for Time

source§

const INIT: Time = Self::ZERO

source§

impl<System> Init for r3_core::kernel::hunk::Hunk<System>where System: KernelStatic<System>,

source§

const INIT: Hunk<System> = Self::from_offset(0)

source§

impl<System, T> Init for r3_core::hunk::Hunk<System, [T]>where System: KernelBase + KernelStatic<System>,

source§

const INIT: Hunk<System, [T]> = Self{ offset: slice_from_raw_parts_mut(core::ptr::null_mut(), 0), _phantom: PhantomData,}

source§

impl<T> Init for r3_core::utils::rawcell::RawCell<T>where T: Init,

source§

const INIT: RawCell<T> = RawCell::new(T::INIT)

source§

impl<T: Init> Init for r3_kernel::utils::RawCell<T>

source§

const INIT: Self = _

source§

impl<Traits: KernelCfg2, PortTaskState: 'static, TaskReadyQueue: 'static + Init, TaskPriority: 'static, TimeoutHeap: 'static + Init> Init for State<Traits, PortTaskState, TaskReadyQueue, TaskPriority, TimeoutHeap>

source§

const INIT: Self = _

source§

impl<Traits: KernelTraits> Init for StackHunk<Traits>

source§

const INIT: Self = _

source§

impl<const LEN: usize, const ALIGN: usize> Init for r3_core::utils::aligned_storage::AlignedStorage<LEN, ALIGN>where Align<ALIGN>: Alignment,

source§

const INIT: AlignedStorage<LEN, ALIGN> = Self(elain::Align::NEW, MaybeUninit::uninit_array())

source§

impl<const LEN: usize, const ALIGN: usize> Init for r3_kernel::utils::AlignedStorage<LEN, ALIGN>where Align<ALIGN>: Alignment,

source§

const INIT: Self = _