pub struct SourceView {
pub id: String,
pub label: String,
pub venue: String,
pub connected: bool,
pub needs_sign_in: bool,
pub needs_keys: bool,
}Expand description
One source the app can fetch from.
Fields§
§id: String§label: String§venue: StringThe namespace instruments fetched here are filed under. Shown because it is half of the instrument id a person will see afterwards.
connected: boolWhether it can fetch right now. Always true for a source needing no credential, which is the honest answer rather than a claim about a session that does not exist.
needs_sign_in: boolWhether this source has a browser sign-in, so the window does not offer a button for something that cannot be done.
needs_keys: boolWhether this source is authorised by a key pair typed in once.
Two flags rather than one enum, because a view is a flattened thing and
this one crosses to a wasm window that depends on serde and nothing
else. The single source of truth is arvo_data::source::Credential,
read once in list_sources through a match the compiler keeps
exhaustive — so the pair cannot drift from it, even though the pair by
itself could express nonsense.
Trait Implementations§
Source§impl Clone for SourceView
impl Clone for SourceView
Source§impl Debug for SourceView
impl Debug for SourceView
Source§impl Default for SourceView
impl Default for SourceView
Source§impl<'de> Deserialize<'de> for SourceView
impl<'de> Deserialize<'de> for SourceView
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 SourceView
Source§impl Hash for SourceView
impl Hash for SourceView
Source§impl Message for SourceView
impl Message for SourceView
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.