pub struct TickerForge {
pub spec: SpecRepository,
}Expand description
High-level API matching Python TickerForge.
Fields§
§spec: SpecRepositoryImplementations§
Source§impl TickerForge
impl TickerForge
pub fn new() -> Result<Self, String>
pub fn with_spec_path(path: &Path) -> Result<Self, String>
Sourcepub fn gen(&self, symbol: &str) -> Result<String, String>
pub fn gen(&self, symbol: &str) -> Result<String, String>
Front-month ticker for today (offset 0).
Sourcepub fn gen_signed(&self, symbol: &str, offset: isize) -> Result<String, String>
pub fn gen_signed(&self, symbol: &str, offset: isize) -> Result<String, String>
Signed-offset ticker for today. See generate_ticker_for_contract_signed.
pub fn generate( &self, symbol: &str, date: &str, offset: usize, ) -> Result<String, String>
Auto Trait Implementations§
impl !Freeze for TickerForge
impl RefUnwindSafe for TickerForge
impl Send for TickerForge
impl Sync for TickerForge
impl Unpin for TickerForge
impl UnsafeUnpin for TickerForge
impl UnwindSafe for TickerForge
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