Note

Struct Note 

Source
#[repr(C, align(4))]
pub struct Note<T, const N: usize> { /* private fields */ }
Expand description

A note as defined in the ELF specification

You probably don’t want this struct. The noted! macro should provide everything you need.

An instance of this struct should be binary compatible with notes as defined in the ELF specification. However, you MUST put this note in an appropriate ELF section. For example, #[link_section = ".note"].

Implementations§

Source§

impl<T, const N: usize> Note<T, N>

Source

pub const fn new(name: &'static str, id: u32, desc: T) -> Self

Creates a new Note instance.

You probably don’t want this function. The noted! macro should provide everything you need.

Note that if insufficient name bytes (i.e. N) are provided, the name will be silently truncated. You should use the provided macro (see above) to avoid this problem.

Auto Trait Implementations§

§

impl<T, const N: usize> Freeze for Note<T, N>
where T: Freeze,

§

impl<T, const N: usize> RefUnwindSafe for Note<T, N>
where T: RefUnwindSafe,

§

impl<T, const N: usize> Send for Note<T, N>
where T: Send,

§

impl<T, const N: usize> Sync for Note<T, N>
where T: Sync,

§

impl<T, const N: usize> Unpin for Note<T, N>
where T: Unpin,

§

impl<T, const N: usize> UnwindSafe for Note<T, N>
where T: 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, 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.