Struct Counterparty
pub struct Counterparty {
acronym: String,
csa: CsaSpec,
}Expand description
A trading counterparty: its acronym and the CSA governing its trades.
Fields§
§acronym: String§csa: CsaSpecImplementations§
§impl Counterparty
impl Counterparty
pub fn new(acronym: impl Into<String>, csa: CsaSpec) -> Self
pub fn new(acronym: impl Into<String>, csa: CsaSpec) -> Self
A counterparty acronym whose trades are collateralised under csa.
pub fn collateral_currency(&self) -> &str
pub fn collateral_currency(&self) -> &str
The currency the CSA posts collateral in.
pub fn collateral_for(&self, currency: Currency) -> CollateralSpec
pub fn collateral_for(&self, currency: Currency) -> CollateralSpec
The discount key a trade in currency facing this counterparty
declares: the currency’s own key where it is the CSA’s, the currency
under the CSA’s otherwise.
Trait Implementations§
§impl Clone for Counterparty
impl Clone for Counterparty
§fn clone(&self) -> Counterparty
fn clone(&self) -> Counterparty
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for Counterparty
impl !UnwindSafe for Counterparty
impl Freeze for Counterparty
impl Send for Counterparty
impl Sync for Counterparty
impl Unpin for Counterparty
impl UnsafeUnpin for Counterparty
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