pub struct CandleSpecification {
pub instrument: InstrumentName,
pub granularity: CandlestickGranularity,
pub price: Option<PricingComponent>,
}Expand description
An instrument name, a granularity, and a price component to get
candlestick data for, e.g. EUR_USD:S10:BM.
Fields§
§instrument: InstrumentNameThe instrument to get candles for.
granularity: CandlestickGranularityThe candlestick granularity.
price: Option<PricingComponent>The price component(s); OANDA defaults to mid when omitted.
Implementations§
Source§impl CandleSpecification
impl CandleSpecification
Sourcepub fn new(
instrument: impl Into<InstrumentName>,
granularity: CandlestickGranularity,
) -> Self
pub fn new( instrument: impl Into<InstrumentName>, granularity: CandlestickGranularity, ) -> Self
A specification for the given instrument and granularity (mid price).
Sourcepub fn price(self, price: PricingComponent) -> Self
pub fn price(self, price: PricingComponent) -> Self
Selects the price component(s) for this specification.
Trait Implementations§
Source§impl Clone for CandleSpecification
impl Clone for CandleSpecification
Source§fn clone(&self) -> CandleSpecification
fn clone(&self) -> CandleSpecification
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 CandleSpecification
impl Debug for CandleSpecification
Source§impl Display for CandleSpecification
impl Display for CandleSpecification
impl Eq for CandleSpecification
Source§impl Hash for CandleSpecification
impl Hash for CandleSpecification
Source§impl PartialEq for CandleSpecification
impl PartialEq for CandleSpecification
impl StructuralPartialEq for CandleSpecification
Auto Trait Implementations§
impl Freeze for CandleSpecification
impl RefUnwindSafe for CandleSpecification
impl Send for CandleSpecification
impl Sync for CandleSpecification
impl Unpin for CandleSpecification
impl UnsafeUnpin for CandleSpecification
impl UnwindSafe for CandleSpecification
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.