#[non_exhaustive]pub enum ClockError {
Unavailable,
}Expand description
The current time was asked for and this build cannot provide it.
crate::utils::time::now, crate::utils::time::evaluation_time and
crate::utils::time::resolution_base return it as such, and
TradeError, PositionError, ChainError, StrategyError and
TransactionError have a Clock variant for it.
A time to expiry is different. years_to_expiration and its siblings return
the expiration_date crate’s own error, which cannot name this one, so
ExpirationDateError::InvalidDateTime holds its message, and it arrives as
OptionsError::ExpirationDate, PricingError::Options, GreeksError::ExpirationDate
and so on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
The crate was built without the clock feature, and the operation has no
explicit time to use instead. A reference datetime stands in for the clock only
where a time to expiry or an expiry date is measured, not where a new record is
stamped.
Trait Implementations§
Source§impl Clone for ClockError
impl Clone for ClockError
impl Copy for ClockError
Source§impl Debug for ClockError
impl Debug for ClockError
Source§impl Display for ClockError
impl Display for ClockError
impl Eq for ClockError
Source§impl Error for ClockError
impl Error for ClockError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ClockError> for ExpirationDateError
impl From<ClockError> for ExpirationDateError
Source§fn from(err: ClockError) -> Self
fn from(err: ClockError) -> Self
Source§impl From<ClockError> for PositionError
impl From<ClockError> for PositionError
Source§fn from(source: ClockError) -> Self
fn from(source: ClockError) -> Self
Source§impl From<ClockError> for TradeError
impl From<ClockError> for TradeError
Source§fn from(source: ClockError) -> Self
fn from(source: ClockError) -> Self
Source§impl PartialEq for ClockError
impl PartialEq for ClockError
impl StructuralPartialEq for ClockError
Auto Trait Implementations§
impl Forget for ClockError
impl Freeze for ClockError
impl RefUnwindSafe for ClockError
impl Send for ClockError
impl Sync for ClockError
impl Unpin for ClockError
impl UnsafeUnpin for ClockError
impl UnwindSafe for ClockError
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
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
key and return true if they are equal.