pub struct MappingRuleField {
pub key: &'static str,
pub kind: RuleFieldType,
pub min: Option<f64>,
pub min_exclusive: bool,
pub max: Option<f64>,
pub default: RuleDefault,
pub allowed: &'static [&'static str],
pub plasticity_only: bool,
}Expand description
One mapping-rule field.
Fields§
§key: &'static str§kind: RuleFieldType§min: Option<f64>Lower bound, if any.
min_exclusive: boolWhen true the lower bound itself is excluded (value > min).
max: Option<f64>Upper bound (inclusive), if any.
default: RuleDefault§allowed: &'static [&'static str]Allowed string values (case-insensitive), for enumerated fields.
plasticity_only: boolTrue when changing the field never changes which synapses exist or their stored weights.
Implementations§
Source§impl MappingRuleField
impl MappingRuleField
Sourcepub fn accepts_number(&self, value: f64) -> bool
pub fn accepts_number(&self, value: f64) -> bool
True when value is a finite-or-infinite non-NaN number inside the field’s range.
Sourcepub fn to_schema_json(&self) -> Value
pub fn to_schema_json(&self) -> Value
JSON entry served by the schema endpoint.
Trait Implementations§
Source§impl Clone for MappingRuleField
impl Clone for MappingRuleField
impl Copy for MappingRuleField
Auto Trait Implementations§
impl Forget for MappingRuleField
impl Freeze for MappingRuleField
impl Move for MappingRuleField
impl RefUnwindSafe for MappingRuleField
impl Send for MappingRuleField
impl Sync for MappingRuleField
impl Unpin for MappingRuleField
impl UnsafeUnpin for MappingRuleField
impl UnwindSafe for MappingRuleField
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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