[][src]Struct bot_rs_core::profile::Profile

pub struct Profile { /* fields omitted */ }

Profile configuration containing configurations for the Bot-RS Core functionality.

Profile configurations are located at {{ENV_CONFIG_DIR}}/profiles/{profile-name}.

A Profile is only allowed to join the channel its named after.

Implementations

impl Profile[src]

pub fn empty() -> Self[src]

pub fn new(
    name: String,
    channels: Vec<String>,
    client_id: String,
    client_secret: Option<String>
) -> Self
[src]

pub fn active() -> Option<Self>[src]

pub fn get_channels(&self) -> &[String][src]

pub fn get_client_id(&self) -> String[src]

pub fn get_client_secret(&self) -> Option<String>[src]

pub fn add_channels(&mut self, channels: Vec<String>)[src]

pub fn from_dir(dir: &DirEntry) -> Result<Self, ProfileError>[src]

pub fn profile_dir(name: OsString) -> PathBuf[src]

pub fn set_active(&self)[src]

pub fn set_credentials(&mut self, platform: Platform, creds: Credentials)[src]

Sets the given credentials for the platform. Overwrites existing credentials for the platform.

pub fn get_credentials(&self, platform: &Platform) -> Option<&Credentials>[src]

pub fn rights(&self) -> &AccessRights[src]

pub fn path(&self) -> PathBuf[src]

pub fn plugins_path(&self) -> PathBuf[src]

pub fn save(&self) -> Result<(), ProfileError>[src]

pub fn delete(&self) -> Result<(), ProfileError>[src]

Trait Implementations

impl Clone for Profile[src]

impl Debug for Profile[src]

impl<'de> Deserialize<'de> for Profile[src]

impl Display for Profile[src]

impl Eq for Profile[src]

impl PartialEq<Profile> for Profile[src]

impl Serialize for Profile[src]

impl StructuralEq for Profile[src]

impl StructuralPartialEq for Profile[src]

Auto Trait Implementations

impl NotInvocErr for Profile

impl RefUnwindSafe for Profile

impl Send for Profile

impl Sync for Profile

impl Unpin for Profile

impl UnwindSafe for Profile

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,