Struct Baseline

Source
pub struct Baseline<const YEAR: u32>(/* private fields */);
Expand description

The whole CFD baseline for a given year: 2020, 2021 or 2025

Implementations§

Source§

impl<const YEAR: u32> Baseline<YEAR>

Source

pub fn from_env() -> Result<Self, BaselineError>

Read a list of cases from a file which path is given by the env variable CFD_CASES

The file must have one case per line

Source§

impl<const CFD_YEAR: u32> Baseline<CFD_YEAR>

Source

pub fn mount() -> Self

Mount cases

Source

pub fn redo() -> Self

REDO cases

Source

pub fn thbound2() -> Self

REDO cases

Source

pub fn extras(self) -> Self

Extra cases (22m/s)

Trait Implementations§

Source§

impl<const YEAR: u32> BaselineTrait<YEAR> for Baseline<YEAR>

Source§

fn path() -> Result<PathBuf, BaselineError>

Returns the default path to the CFD cases repository Return the path from the “CFD__REPO” or “CFD_REPO” environment variable if any is set, otherwise returns the default path
Source§

fn configuration(zenith_angle: ZenithAngle) -> Vec<(WindSpeed, Enclosure)>

Returns pairs of WindSpeed and Enclosure configuration for the given ZenithAngle
Source§

fn at_zenith(zenith_angle: ZenithAngle) -> Self

Returns a CFD baseline reduced to the given ZenithAngle
Source§

fn find<const OTHER_YEAR: u32>( cfd_case_21: CfdCase<OTHER_YEAR>, ) -> Option<CfdCase<YEAR>>

Finds the CFD case from OTHER_YEAR that matches a CFD baseline case in YEAR
Source§

impl<const YEAR: u32> Debug for Baseline<YEAR>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const YEAR: u32> Default for Baseline<YEAR>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<const YEAR: u32> From<Vec<CfdCase<YEAR>>> for Baseline<YEAR>

Source§

fn from(cfd_cases: Vec<CfdCase<YEAR>>) -> Self

Converts to this type from the input type.
Source§

impl<const YEAR: u32> FromIterator<CfdCase<YEAR>> for Baseline<YEAR>

Source§

fn from_iter<T: IntoIterator<Item = CfdCase<YEAR>>>(iter: T) -> Self

Creates a value from an iterator. Read more
Source§

impl<const YEAR: u32> IntoIterator for Baseline<YEAR>

Source§

type Item = CfdCase<YEAR>

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<<Baseline<YEAR> as IntoIterator>::Item>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<const YEAR: u32> Freeze for Baseline<YEAR>

§

impl<const YEAR: u32> RefUnwindSafe for Baseline<YEAR>

§

impl<const YEAR: u32> Send for Baseline<YEAR>

§

impl<const YEAR: u32> Sync for Baseline<YEAR>

§

impl<const YEAR: u32> Unpin for Baseline<YEAR>

§

impl<const YEAR: u32> UnwindSafe for Baseline<YEAR>

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

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V