Struct rustsbi::Builder

source ·
pub struct Builder<T, I, R, H, S, P> { /* private fields */ }
Expand description

Structure to build a RustSBI instance

Implementations§

source§

impl Builder<Infallible, Infallible, Infallible, Infallible, Infallible, Infallible>

source

pub const fn new_machine( ) -> Builder<Infallible, Infallible, Infallible, Infallible, Infallible, Infallible>

Create a new Builder from current machine environment

source§

impl<T, I, R, H, S, P> Builder<T, I, R, H, S, P>

source

pub fn with_timer<T2: Timer>(self, timer: T2) -> Builder<T2, I, R, H, S, P>

Add Timer programmer extension to RustSBI

source

pub fn with_ipi<I2: Ipi>(self, ipi: I2) -> Builder<T, I2, R, H, S, P>

Add Inter-processor Interrupt extension to RustSBI

source

pub fn with_fence<R2: Fence>(self, fence: R2) -> Builder<T, I, R2, H, S, P>

Add Remote Fence extension to RustSBI

source

pub fn with_hsm<H2: Hsm>(self, hsm: H2) -> Builder<T, I, R, H2, S, P>

Add Hart State Monitor extension to RustSBI

source

pub fn with_reset<S2: Reset>(self, reset: S2) -> Builder<T, I, R, H, S2, P>

Add System Reset extension to RustSBI

source

pub fn with_pmu<P2: Pmu>(self, pmu: P2) -> Builder<T, I, R, H, S, P2>

Add Performance Monitor Unit extension to RustSBI

source

pub fn build(self) -> RustSBI<T, I, R, H, S, P>

Build the target RustSBI instance

Auto Trait Implementations§

§

impl<T, I, R, H, S, P> RefUnwindSafe for Builder<T, I, R, H, S, P>where H: RefUnwindSafe, I: RefUnwindSafe, P: RefUnwindSafe, R: RefUnwindSafe, S: RefUnwindSafe, T: RefUnwindSafe,

§

impl<T, I, R, H, S, P> Send for Builder<T, I, R, H, S, P>where H: Send, I: Send, P: Send, R: Send, S: Send, T: Send,

§

impl<T, I, R, H, S, P> Sync for Builder<T, I, R, H, S, P>where H: Sync, I: Sync, P: Sync, R: Sync, S: Sync, T: Sync,

§

impl<T, I, R, H, S, P> Unpin for Builder<T, I, R, H, S, P>where H: Unpin, I: Unpin, P: Unpin, R: Unpin, S: Unpin, T: Unpin,

§

impl<T, I, R, H, S, P> UnwindSafe for Builder<T, I, R, H, S, P>where H: UnwindSafe, I: UnwindSafe, P: UnwindSafe, R: UnwindSafe, S: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · 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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.