pub struct BarType {
pub symbol: String,
pub specification: BarSpecification,
}Expand description
Bar type combining symbol and specification
Fields§
§symbol: StringThe trading symbol.
specification: BarSpecificationThe bar specification.
Implementations§
Source§impl BarType
impl BarType
Sourcepub const fn new(symbol: String, specification: BarSpecification) -> Self
pub const fn new(symbol: String, specification: BarSpecification) -> Self
Create a new bar type
Sourcepub const fn get_spec(&self) -> &BarSpecification
pub const fn get_spec(&self) -> &BarSpecification
Get the bar specification
Sourcepub const fn new_standard(
symbol: String,
aggregation: BarAggregation,
step: u64,
) -> Self
pub const fn new_standard( symbol: String, aggregation: BarAggregation, step: u64, ) -> Self
Create a standard time-based bar type
Trait Implementations§
impl Eq for BarType
impl StructuralPartialEq for BarType
Auto Trait Implementations§
impl Freeze for BarType
impl RefUnwindSafe for BarType
impl Send for BarType
impl Sync for BarType
impl Unpin for BarType
impl UnwindSafe for BarType
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§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>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.