Struct Preset
pub struct Preset {
name: &'static str,
measure: Measure,
default_scale: Scale,
}Expand description
A named risk measure: the point it names, and the scale it reports in when asked for by name.
Fields§
§name: &'static str§measure: Measure§default_scale: ScaleImplementations§
§impl Preset
impl Preset
pub fn default_scale(&self) -> Scale
pub fn default_scale(&self) -> Scale
The scale it reports in when asked for by name and nothing else states one.
pub fn asset_class(&self) -> Option<AssetClass>
pub fn asset_class(&self) -> Option<AssetClass>
The asset class it is filed under — its axis’s, so the two cannot
disagree. None for NPV, which belongs to every desk.
pub fn requires(&self) -> &'static str
pub fn requires(&self) -> &'static str
What the market must hold beyond the curves the trades price on, in words — empty where it needs nothing more.
pub fn per(&self, scale: Scale) -> Request
pub fn per(&self, scale: Scale) -> Request
This preset restated at scale: the same name, a stated scale.
pub fn of_class(class: AssetClass) -> impl Iterator<Item = &'static Preset>
pub fn of_class(class: AssetClass) -> impl Iterator<Item = &'static Preset>
The presets filed under class, in table order.
Trait Implementations§
impl Copy for Preset
impl Eq for Preset
§impl FromStr for Preset
A preset by name. Case and _/- are not significant, as for every other
named vocabulary; the rejection lists the table.
impl FromStr for Preset
A preset by name. Case and _/- are not significant, as for every other
named vocabulary; the rejection lists the table.
impl StructuralPartialEq for Preset
Auto Trait Implementations§
impl Freeze for Preset
impl RefUnwindSafe for Preset
impl Send for Preset
impl Sync for Preset
impl Unpin for Preset
impl UnsafeUnpin for Preset
impl UnwindSafe for Preset
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more