#[non_exhaustive]pub enum SettlementError {
UnsupportedOptionType {
option_type: OptionType,
},
MissingPrice {
settlement_type: SettlementType,
event: SettlementEvent,
},
PriceAfterCutoff {
observed_at: DateTime<Utc>,
cutoff: DateTime<Utc>,
},
EventSideMismatch {
event: SettlementEvent,
side: Side,
},
ArithmeticOverflow {
operation: &'static str,
reason: String,
},
}Expand description
Reasons why settlement_obligation
cannot compute what an option position owes or receives.
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.
UnsupportedOptionType
The contract’s option type has no settlement rule. Only European and American options are supported.
Fields
§
option_type: OptionTypeThe rejected option type.
MissingPrice
The event needs a settlement price and none was supplied.
An expiry needs one to decide moneyness and a cash settlement needs one to size its cashflow. A physical explicit exercise or assignment needs none.
Fields
§
settlement_type: SettlementTypeThe settlement type of the event.
§
event: SettlementEventThe event that needs the price.
PriceAfterCutoff
The settlement price was observed after the cutoff.
Fields
EventSideMismatch
The event cannot happen to a position on this side: only a long position exercises and only a short position is assigned.
ArithmeticOverflow
A figure of the obligation left the representable range.
Trait Implementations§
Source§impl Clone for SettlementError
impl Clone for SettlementError
Source§impl Debug for SettlementError
impl Debug for SettlementError
Source§impl Display for SettlementError
impl Display for SettlementError
impl Eq for SettlementError
Source§impl Error for SettlementError
impl Error for SettlementError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SettlementError
impl PartialEq for SettlementError
impl StructuralPartialEq for SettlementError
Auto Trait Implementations§
impl Forget for SettlementError
impl Freeze for SettlementError
impl RefUnwindSafe for SettlementError
impl Send for SettlementError
impl Sync for SettlementError
impl Unpin for SettlementError
impl UnsafeUnpin for SettlementError
impl UnwindSafe for SettlementError
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.