pub struct SignalScore { /* private fields */ }Expand description
A finite quantitative signal score with descriptive semantics.
Implementations§
Source§impl SignalScore
impl SignalScore
Sourcepub fn new(name: SignalName, score: f64) -> Result<SignalScore, SignalError>
pub fn new(name: SignalName, score: f64) -> Result<SignalScore, SignalError>
Creates a signal score with unknown direction and strength.
§Errors
Returns SignalError::NonFiniteScore when score is not finite.
Sourcepub fn with_direction(self, direction: SignalDirection) -> SignalScore
pub fn with_direction(self, direction: SignalDirection) -> SignalScore
Sets descriptive direction vocabulary.
Sourcepub fn with_strength(self, strength: SignalStrength) -> SignalScore
pub fn with_strength(self, strength: SignalStrength) -> SignalScore
Sets descriptive strength vocabulary.
Sourcepub const fn name(&self) -> &SignalName
pub const fn name(&self) -> &SignalName
Returns the signal name.
Sourcepub const fn direction(&self) -> &SignalDirection
pub const fn direction(&self) -> &SignalDirection
Returns the descriptive direction.
Sourcepub const fn strength(&self) -> &SignalStrength
pub const fn strength(&self) -> &SignalStrength
Returns the descriptive strength.
Trait Implementations§
Source§impl Clone for SignalScore
impl Clone for SignalScore
Source§fn clone(&self) -> SignalScore
fn clone(&self) -> SignalScore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SignalScore
impl Debug for SignalScore
Source§impl PartialEq for SignalScore
impl PartialEq for SignalScore
Source§fn eq(&self, other: &SignalScore) -> bool
fn eq(&self, other: &SignalScore) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SignalScore
Auto Trait Implementations§
impl Freeze for SignalScore
impl RefUnwindSafe for SignalScore
impl Send for SignalScore
impl Sync for SignalScore
impl Unpin for SignalScore
impl UnsafeUnpin for SignalScore
impl UnwindSafe for SignalScore
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