pub struct EventView {
pub kind: Option<EventKindView>,
pub title: String,
pub detail: String,
pub severity: i32,
}Expand description
Every shape at the root as well, because a window names a view on nearly
every line and arvo_api::research::StudyView would be noise. The names
do not collide: proto has no overloading and neither does this.
Something that happened while nobody was looking: a plugin dropped, a
broker session ended (#150).
Every other view answers a question a front end asked. This is the other direction, so it arrives on a stream rather than as a reply.
§Why the text is in the payload
title and detail are filled in by the engine rather than derived from
the kind by whoever renders it. There are two renderers — the OS
notification and the in-app alerts list — and text derived twice is text
that drifts. The kind is left for what a renderer needs structurally:
the status bar needs to know a feed is down, not how to phrase it.
Fields§
§kind: Option<EventKindView>§title: String§detail: String§severity: i32Implementations§
Source§impl EventView
impl EventView
Sourcepub fn severity(&self) -> SeverityView
pub fn severity(&self) -> SeverityView
Returns the enum value of severity, or the default if the field is set to an invalid enum value.
Sourcepub fn set_severity(&mut self, value: SeverityView)
pub fn set_severity(&mut self, value: SeverityView)
Sets severity to the provided enum value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventView
impl<'de> Deserialize<'de> for EventView
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>,
impl Eq for EventView
Source§impl Message for EventView
impl Message for EventView
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.