Enum FutureContract
#[non_exhaustive]pub enum FutureContract {
Month {
year: i32,
month: u32,
},
Window {
start: NaiveDate,
end: NaiveDate,
},
}Expand description
Which listed contract a futures rung is quoted on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Month
The contract delivering in year-month, its reference window read
off the template’s rule (IMM quarter or calendar month).
Window
An explicit reference window, for a contract the template’s rule does not describe.
Implementations§
§impl FutureContract
impl FutureContract
pub fn parse(code: &str) -> Result<Self, RungBuildError>
pub fn parse(code: &str) -> Result<Self, RungBuildError>
A contract from its IMM code — the month letters and two-digit year a
quote sheet prints, DEC26 — or a YYYY-MM spelling.
§Errors
RungBuildError::Contract naming the spelling.
Trait Implementations§
§impl Clone for FutureContract
impl Clone for FutureContract
§fn clone(&self) -> FutureContract
fn clone(&self) -> FutureContract
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 FutureContract
§impl Debug for FutureContract
impl Debug for FutureContract
impl Eq for FutureContract
§impl PartialEq for FutureContract
impl PartialEq for FutureContract
impl StructuralPartialEq for FutureContract
Auto Trait Implementations§
impl Freeze for FutureContract
impl RefUnwindSafe for FutureContract
impl Send for FutureContract
impl Sync for FutureContract
impl Unpin for FutureContract
impl UnsafeUnpin for FutureContract
impl UnwindSafe for FutureContract
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