Struct ruma_common::thirdparty::Protocol [−][src]
#[non_exhaustive]pub struct Protocol { pub user_fields: Vec<String>, pub location_fields: Vec<String>, pub icon: String, pub field_types: BTreeMap<String, FieldType>, pub instances: Vec<ProtocolInstance>, }
Expand description
Metadata about a third party protocol.
To create an instance of this type, first create a ProtocolInit and convert it via
Protocol::from / .into().
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct {{ .. }} syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.user_fields: Vec<String>Expand description
Fields which may be used to identify a third party user.
location_fields: Vec<String>Expand description
Fields which may be used to identify a third party location.
icon: StringExpand description
A content URI representing an icon for the third party protocol.
If you activate the compat feature, this field being absent in JSON will give you an
empty string here.
field_types: BTreeMap<String, FieldType>Expand description
The type definitions for the fields defined in user_fields and location_fields.
instances: Vec<ProtocolInstance>Expand description
A list of objects representing independent instances of configuration.
Trait Implementations
impl<'de> Deserialize<'de> for Protocol[src]
impl<'de> Deserialize<'de> for Protocol[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
impl From<ProtocolInit> for Protocol[src]
impl From<ProtocolInit> for Protocol[src]fn from(init: ProtocolInit) -> Self[src]
fn from(init: ProtocolInit) -> Self[src]Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,