pub struct MemberView {
pub instrument: String,
pub trades: u32,
pub pnl: f64,
pub share: Option<f64>,
pub silent: bool,
}Expand description
What one member of a book actually contributed.
A book reports one return for several instruments, and the single most useful question about it is which of them produced that return. The panel answers the same question by running members separately; a book cannot, because the members interfere — so it has to be read out of the ledger.
Fields§
§instrument: String§trades: u32§pnl: f64Realised profit, net of what the venue charged.
This member’s share of the book’s total realised profit.
None when the book realised nothing at all, rather than a share of
zero — which would read as a measurement.
silent: boolTrue when the member never opened a position.
The failure mode a shared account introduces: an instrument that was asked for, funded by nothing, and silently absent from every number.
Implementations§
Source§impl MemberView
impl MemberView
Returns the value of share, or the default value if share is unset.
Trait Implementations§
Source§impl Clone for MemberView
impl Clone for MemberView
Source§impl Debug for MemberView
impl Debug for MemberView
Source§impl Default for MemberView
impl Default for MemberView
Source§impl<'de> Deserialize<'de> for MemberView
impl<'de> Deserialize<'de> for MemberView
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for MemberView
impl Message for MemberView
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.