Skip to main content

RequestBound

Trait RequestBound 

Source
pub trait RequestBound {
    // Required methods
    fn least_wcet_in_interval(&self, delta: Duration) -> Service;
    fn steps_iter<'a>(&'a self) -> Box<dyn Iterator<Item = Duration> + 'a>;
    fn job_cost_iter<'a>(
        &'a self,
        delta: Duration,
    ) -> Box<dyn Iterator<Item = Service> + 'a>;

    // Provided methods
    fn service_needed(&self, delta: Duration) -> Service { ... }
    fn service_needed_by_n_jobs(
        &self,
        delta: Duration,
        max_jobs: usize,
    ) -> Service { ... }
}
Expand description

The general interface for (arbitrarily shaped) processor demand. This can represent the demand of a single task, or the cumulative demand of multiple tasks.

Required Methods§

Source

fn least_wcet_in_interval(&self, delta: Duration) -> Service

Expose the smallest WCET of any job encountered in an interval of length delta.

Source

fn steps_iter<'a>(&'a self) -> Box<dyn Iterator<Item = Duration> + 'a>

Yield an iterator over the interval lengths (i.e., values of delta in RequestBound::service_needed) at which the cumulative demand changes.

More precisely, this iterator yields every value of delta such that:

self.service_needed(delta - 1) < self.service_needed(delta).

Source

fn job_cost_iter<'a>( &'a self, delta: Duration, ) -> Box<dyn Iterator<Item = Service> + 'a>

Expose an iterator over the individual costs that comprise the overall demand.

Provided Methods§

Source

fn service_needed(&self, delta: Duration) -> Service

Bound the total amount of service needed in an interval of length delta.

Source

fn service_needed_by_n_jobs(&self, delta: Duration, max_jobs: usize) -> Service

Bound the total amount of service needed by up to max_jobs in an interval of length delta.

Trait Implementations§

Source§

impl<'a, B: ArrivalBound + 'a, C: JobCostModel + 'a> AsRef<dyn RequestBound + 'a> for RBF<B, C>

Source§

fn as_ref<'b>(&'b self) -> &'b (dyn RequestBound + 'a)

Converts this type into a shared reference of the (usually inferred) input type.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'b, T: 'b + RequestBound + ?Sized> RequestBound for &'b T

Source§

fn service_needed(&self, delta: Duration) -> Service

Source§

fn service_needed_by_n_jobs(&self, delta: Duration, max_jobs: usize) -> Service

Source§

fn least_wcet_in_interval(&self, delta: Duration) -> Service

Source§

fn steps_iter<'a>(&'a self) -> Box<dyn Iterator<Item = Duration> + 'a>

Source§

fn job_cost_iter<'a>( &'a self, delta: Duration, ) -> Box<dyn Iterator<Item = Service> + 'a>

Source§

impl<T: RequestBound + ?Sized> RequestBound for Box<T>

Source§

fn service_needed(&self, delta: Duration) -> Service

Source§

fn service_needed_by_n_jobs(&self, delta: Duration, max_jobs: usize) -> Service

Source§

fn least_wcet_in_interval(&self, delta: Duration) -> Service

Source§

fn steps_iter<'a>(&'a self) -> Box<dyn Iterator<Item = Duration> + 'a>

Source§

fn job_cost_iter<'a>( &'a self, delta: Duration, ) -> Box<dyn Iterator<Item = Service> + 'a>

Source§

impl<T: RequestBound + ?Sized> RequestBound for Rc<T>

Source§

fn service_needed(&self, delta: Duration) -> Service

Source§

fn service_needed_by_n_jobs(&self, delta: Duration, max_jobs: usize) -> Service

Source§

fn least_wcet_in_interval(&self, delta: Duration) -> Service

Source§

fn steps_iter<'a>(&'a self) -> Box<dyn Iterator<Item = Duration> + 'a>

Source§

fn job_cost_iter<'a>( &'a self, delta: Duration, ) -> Box<dyn Iterator<Item = Service> + 'a>

Implementors§