pub struct RiskPreset {
pub preset_name: &'static str,
pub label: &'static str,
pub help: &'static str,
pub values: fn() -> RiskProfileConfig,
}Expand description
One row in the Risk preset table. The Quickstart UI renders the
label, the runtime writes values to
risk-profiles.<preset_name> on apply.
Fields§
§preset_name: &'static strAlias key written to risk-profiles.<preset_name>. Doubles as
the stable wire identifier (BuilderSubmission.risk_preset).
label: &'static strShort label rendered in the picker UI.
help: &'static strOne-line help blurb rendered next to the label.
values: fn() -> RiskProfileConfigFactory that produces the RiskProfileConfig this preset
installs. A function (not a const value) because
RiskProfileConfig has owned Vec<String> fields that cannot
live in a const.
Trait Implementations§
Source§impl Clone for RiskPreset
impl Clone for RiskPreset
Source§fn clone(&self) -> RiskPreset
fn clone(&self) -> RiskPreset
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RiskPreset
impl Debug for RiskPreset
Source§impl Serialize for RiskPreset
impl Serialize for RiskPreset
impl Copy for RiskPreset
Auto Trait Implementations§
impl Freeze for RiskPreset
impl RefUnwindSafe for RiskPreset
impl Send for RiskPreset
impl Sync for RiskPreset
impl Unpin for RiskPreset
impl UnsafeUnpin for RiskPreset
impl UnwindSafe for RiskPreset
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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