pub struct SignalView {
pub name: String,
pub description: String,
pub causal: bool,
pub because: String,
pub engine: String,
pub at: String,
pub value: Option<f64>,
}Expand description
One signal a plugin publishes, as it stands right now (#163).
A signal that is declared and has no value is shown with none, not with a zero and not with whatever it last said. That is the invariant made visible: a reader looking at this list should be able to see the difference between “nothing to say” and “saying nothing has changed”.
Fields§
§name: String§description: String§causal: boolWhether each value is computed from what was known at that instant. A study may gate on a causal signal and never on a descriptive one.
because: StringWhy it is not causal, in the provider’s own words. Empty when it is.
engine: StringWhat computes it, by name and version.
at: StringThe instant the value describes, empty when there is no value.
value: Option<f64>None is the answer for a signal that is declared and silent, and
for one whose provider has gone away.
Implementations§
Trait Implementations§
Source§impl Clone for SignalView
impl Clone for SignalView
Source§impl Debug for SignalView
impl Debug for SignalView
Source§impl Default for SignalView
impl Default for SignalView
Source§impl<'de> Deserialize<'de> for SignalView
impl<'de> Deserialize<'de> for SignalView
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for SignalView
impl Message for SignalView
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
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,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for SignalView
impl PartialEq for SignalView
Source§impl Serialize for SignalView
impl Serialize for SignalView
impl StructuralPartialEq for SignalView
Auto Trait Implementations§
impl Freeze for SignalView
impl RefUnwindSafe for SignalView
impl Send for SignalView
impl Sync for SignalView
impl Unpin for SignalView
impl UnsafeUnpin for SignalView
impl UnwindSafe for SignalView
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