pub struct OpenTalkInstanceConfig {
pub default_account: OpenTalkAccountId,
pub accounts: BTreeMap<OpenTalkAccountId, OpenTalkAccountConfig>,
}Expand description
Configuration of an OpenTalk instance.
Fields§
§default_account: OpenTalkAccountIdThe id of the default account to use when using the OpenTalk instance.
accounts: BTreeMap<OpenTalkAccountId, OpenTalkAccountConfig>The accounts that are configured for an OpenTalk instance.
Implementations§
Source§impl OpenTalkInstanceConfig
impl OpenTalkInstanceConfig
Sourcepub fn get_default_account(
&self,
) -> Option<(OpenTalkAccountId, OpenTalkAccountConfig)>
pub fn get_default_account( &self, ) -> Option<(OpenTalkAccountId, OpenTalkAccountConfig)>
Get the default instance if available.
Sourcepub fn get_account(
&self,
account_id: &OpenTalkAccountId,
) -> Option<OpenTalkAccountConfig>
pub fn get_account( &self, account_id: &OpenTalkAccountId, ) -> Option<OpenTalkAccountConfig>
Get an account by its OpenTalkAccountId.
Sourcepub fn get_account_with_fallback_to_default(
&self,
account_id: Option<&OpenTalkAccountId>,
) -> Option<(OpenTalkAccountId, OpenTalkAccountConfig)>
pub fn get_account_with_fallback_to_default( &self, account_id: Option<&OpenTalkAccountId>, ) -> Option<(OpenTalkAccountId, OpenTalkAccountConfig)>
Get an account config by an optional id, returning the default account if the id is None.
Sourcepub fn remove_account(&mut self, account_id: Option<&OpenTalkAccountId>)
pub fn remove_account(&mut self, account_id: Option<&OpenTalkAccountId>)
Remove an account from the configuration.
Trait Implementations§
Source§impl Clone for OpenTalkInstanceConfig
impl Clone for OpenTalkInstanceConfig
Source§fn clone(&self) -> OpenTalkInstanceConfig
fn clone(&self) -> OpenTalkInstanceConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenTalkInstanceConfig
impl Debug for OpenTalkInstanceConfig
Source§impl<'de> Deserialize<'de> for OpenTalkInstanceConfig
impl<'de> Deserialize<'de> for OpenTalkInstanceConfig
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 PartialEq for OpenTalkInstanceConfig
impl PartialEq for OpenTalkInstanceConfig
Source§impl Serialize for OpenTalkInstanceConfig
impl Serialize for OpenTalkInstanceConfig
impl Eq for OpenTalkInstanceConfig
impl StructuralPartialEq for OpenTalkInstanceConfig
Auto Trait Implementations§
impl Freeze for OpenTalkInstanceConfig
impl RefUnwindSafe for OpenTalkInstanceConfig
impl Send for OpenTalkInstanceConfig
impl Sync for OpenTalkInstanceConfig
impl Unpin for OpenTalkInstanceConfig
impl UnsafeUnpin for OpenTalkInstanceConfig
impl UnwindSafe for OpenTalkInstanceConfig
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