#[non_exhaustive]pub struct Member {
pub change: f64,
pub volume: f64,
pub new_high: bool,
pub new_low: bool,
}Expand description
One symbol’s contribution to a CrossSection tick.
Field invariants enforced by CrossSection::new when the member is placed
into a tick:
changeis finite (its sign classifies the symbol — positive is advancing, negative is declining, zero is unchanged).volumeis finite and non-negative.
new_high / new_low are caller-supplied flags marking whether the symbol
printed a new period extreme; they carry no numeric invariant.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.change: f64Price change versus the previous close. Sign classifies the symbol: positive is advancing, negative is declining, zero is unchanged.
volume: f64Period volume for the symbol (finite, non-negative).
new_high: boolWhether the symbol printed a new period high.
new_low: boolWhether the symbol printed a new period low.
Implementations§
Source§impl Member
impl Member
Sourcepub const fn new(
change: f64,
volume: f64,
new_high: bool,
new_low: bool,
) -> Self
pub const fn new( change: f64, volume: f64, new_high: bool, new_low: bool, ) -> Self
Assemble a cross-section member.
The field invariants documented on Member are validated centrally by
CrossSection::new when the member is placed into a tick; this
constructor only assembles the value so the #[non_exhaustive] struct can
be built from outside the crate.
Trait Implementations§
impl Copy for Member
impl StructuralPartialEq for Member
Auto Trait Implementations§
impl Freeze for Member
impl RefUnwindSafe for Member
impl Send for Member
impl Sync for Member
impl Unpin for Member
impl UnsafeUnpin for Member
impl UnwindSafe for Member
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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