Skip to main content

EndpointDescriptor

Struct EndpointDescriptor 

Source
#[repr(C)]
pub struct EndpointDescriptor { pub fn_ptr: fn(u64) -> u64, pub index: u8, pub arg_registers: u8, pub arg_meta: u8, pub _pad: [u8; 5], }
Expand description

Descriptor written into the .nub.endpoints ELF section by the endpoint attribute macro. nub-linker reads this section at link time and turns each record into a nub_program::ProgramBlob::endpoints entry.

Layout is #[repr(C)] so the linker can decode the section as a flat array of fixed-size records. On RISC-V64 the function pointer occupies 8 bytes, followed by 8 bytes of metadata, for a total stride of 16 bytes.

Fields§

§fn_ptr: fn(u64) -> u64

RISC-V address of the endpoint function. The linker maps this to a PVM PC via its instruction-mapping table.

§index: u8

Endpoint index (key in the program’s endpoints map).

§arg_registers: u8

Number of register args the caller supplies.

§arg_meta: u8

Opaque metadata byte, passed through to nub_program::Endpoint::arg_meta. nub does not interpret it; a personality may (JAVM reads it as the arg-cnode size).

§_pad: [u8; 5]

Reserved for alignment / future expansion.

Auto Trait Implementations§

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.