Skip to main content

Slot

Struct Slot 

Source
pub struct Slot {
    pub component: Box<dyn Component>,
    pub power: f64,
    pub limits: [Option<f64>; 4],
}
Expand description

A component with its share of the budget.

Fields§

§component: Box<dyn Component>

The component.

§power: f64

Percentage of the budget this module gets (set by the side balancing; ignored for fixed components).

§limits: [Option<f64>; 4]

Optional manual shares, as % of the budget’s LUT, DSP, BRAM and URAM (Resource order). A set limit replaces the power-derived share of that resource and is a hard cap: the module never borrows more of it. None (the default) leaves the resource to the powers and to lending.

Implementations§

Source§

impl Slot

A module of the chip with its power.

Source

pub fn new(component: Box<dyn Component>, power: f64) -> Slot

component with power % of the budget and no manual limits.

Auto Trait Implementations§

§

impl Freeze for Slot

§

impl !RefUnwindSafe for Slot

§

impl !Send for Slot

§

impl !Sync for Slot

§

impl Unpin for Slot

§

impl UnsafeUnpin for Slot

§

impl !UnwindSafe for Slot

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.