PdfGenerator

Trait PdfGenerator 

Source
pub trait PdfGenerator<Dim: Dimension> {
    // Required method
    fn _get_unchecked(&self, dim: Dim) -> Vec<Pdf>;

    // Provided method
    fn get(&self, dim: Dim) -> Vec<Pdf> { ... }
}
Expand description

A value that can generate PDFs of arbitrary dimensions.

There exists a blanket implementation for closures that input a length and return a PDF of that length. The closure will be called once per dimension.

Required Methods§

Source

fn _get_unchecked(&self, dim: Dim) -> Vec<Pdf>

Return one 1D PDF for each dimension requested. Callers should not call this function directly and instead call get.

Provided Methods§

Source

fn get(&self, dim: Dim) -> Vec<Pdf>

Get a PDF with the requested dimensions; returns one 1D PDF per dimension.

Asserts that the implementation gave a PDF of the correct dimensions.

Implementors should not override this method and instead implement _get_unchecked.

Implementations on Foreign Types§

Source§

impl<Dim: Dimension> PdfGenerator<Dim> for fn(Dim) -> Vec<Pdf>

Source§

fn _get_unchecked(&self, dim: Dim) -> Vec<Pdf>

Source§

impl<const N: usize> PdfGenerator<Dim<[usize; N]>> for [fn(usize) -> Pdf; N]
where Dim<[Ix; N]>: Dimension,

Source§

fn _get_unchecked(&self, dim: Dim<[Ix; N]>) -> Vec<Pdf>

Implementors§

Source§

impl<Dim: Dimension, F: Fn(usize) -> Pdf> PdfGenerator<Dim> for F