pub struct PricingComponent {
pub bid: bool,
pub mid: bool,
pub ask: bool,
}Expand description
The price component(s) a candlestick request applies to: any combination
of bid (B), mid (M) and ask (A).
use oanda_rs::models::PricingComponent;
assert_eq!(PricingComponent::MID.to_string(), "M");
assert_eq!(PricingComponent::MID.with_bid().with_ask().to_string(), "BMA");Fields§
§bid: boolInclude bid candles.
mid: boolInclude mid candles.
ask: boolInclude ask candles.
Implementations§
Source§impl PricingComponent
impl PricingComponent
Sourcepub const BID: PricingComponent
pub const BID: PricingComponent
Bid candles only (B).
Sourcepub const MID: PricingComponent
pub const MID: PricingComponent
Mid candles only (M) — OANDA’s default.
Sourcepub const ASK: PricingComponent
pub const ASK: PricingComponent
Ask candles only (A).
Trait Implementations§
Source§impl Clone for PricingComponent
impl Clone for PricingComponent
Source§fn clone(&self) -> PricingComponent
fn clone(&self) -> PricingComponent
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 moreimpl Copy for PricingComponent
Source§impl Debug for PricingComponent
impl Debug for PricingComponent
Source§impl Default for PricingComponent
impl Default for PricingComponent
Source§fn default() -> PricingComponent
fn default() -> PricingComponent
Returns the “default value” for a type. Read more
Source§impl Display for PricingComponent
impl Display for PricingComponent
impl Eq for PricingComponent
Source§impl FromStr for PricingComponent
impl FromStr for PricingComponent
Source§impl Hash for PricingComponent
impl Hash for PricingComponent
Source§impl PartialEq for PricingComponent
impl PartialEq for PricingComponent
impl StructuralPartialEq for PricingComponent
Auto Trait Implementations§
impl Freeze for PricingComponent
impl RefUnwindSafe for PricingComponent
impl Send for PricingComponent
impl Sync for PricingComponent
impl Unpin for PricingComponent
impl UnsafeUnpin for PricingComponent
impl UnwindSafe for PricingComponent
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.