Skip to main content

Frames

Struct Frames 

Source
#[repr(C)]
pub struct Frames<const RAM: bool, T = MaybeUninit<u8>> { raw: Range<RawFrame>, pmm: DynPmm<'static, RAM>, _phantom: PhantomData<[T]>, }
Available on crate feature full only.
Expand description

An owned region of physical memory

Fields§

§raw: Range<RawFrame>§pmm: DynPmm<'static, RAM>§_phantom: PhantomData<[T]>

Implementations§

Source§

impl<const RAM: bool, T> Frames<RAM, T>

Source

pub fn pmm(&self) -> &DynPmm<'static, RAM>

Source

pub fn count(&self) -> usize

Source

pub fn base(&self) -> RawFrame

Source

pub fn as_frame_range(&self) -> Range<RawFrame>

Source

pub unsafe fn base_raw(self: *const Self) -> RawFrame

Source

pub(crate) fn into_raw(self) -> (Range<RawFrame>, DynPmm<'static, RAM>)

Source

pub unsafe fn from_raw(raw: Range<RawFrame>, pmm: DynPmm<'static, RAM>) -> Self

Source§

impl<T> Frames<false, T>

Source

pub(crate) unsafe fn from_raw_tuple<const RAM: bool>( (raw, pmm): (Range<RawFrame>, DynPmm<'static, RAM>), ) -> Self

Source§

impl<const RAM: bool, T> Frames<RAM, MaybeUninit<T>>

Source

pub fn cast<U>(self) -> Frames<RAM, MaybeUninit<U>>

Source§

impl<T> Frames<true, MaybeUninit<T>>

Source

pub fn write_filled(&mut self, value: T) -> &mut [T]
where T: Clone,

Source

pub fn write_filled_with(&mut self, f: impl FnMut(usize) -> T) -> &mut [T]

Source

pub fn into_filed(self, value: T) -> Frames<true, T>
where T: Clone,

Source

pub fn into_filed_with(self, f: impl FnMut(usize) -> T) -> Frames<true, T>

Source§

impl<T> Frames<true, T>

Source

pub fn get(&self) -> &[T]

Source

pub fn get_mut(&mut self) -> &mut [T]

Trait Implementations§

Source§

impl<const RAM: bool, T> Debug for Frames<RAM, T>

Source§

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

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

impl<const RAM: bool, T> Drop for Frames<RAM, T>

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<const RAM: bool, T> Freeze for Frames<RAM, T>

§

impl<const RAM: bool, T> RefUnwindSafe for Frames<RAM, T>
where T: RefUnwindSafe,

§

impl<const RAM: bool, T> Send for Frames<RAM, T>
where T: Send,

§

impl<const RAM: bool, T> Sync for Frames<RAM, T>
where T: Sync,

§

impl<const RAM: bool, T> Unpin for Frames<RAM, T>
where T: Unpin,

§

impl<const RAM: bool, T> UnsafeUnpin for Frames<RAM, T>

§

impl<const RAM: bool, T> UnwindSafe for Frames<RAM, T>
where T: 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
§

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 = Infallible

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

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

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.