[−][src]Struct bot_rs_core::profile::Profile
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]
name: String,
channels: Vec<String>,
client_id: String,
client_secret: Option<String>
) -> Self
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for Profile
[src]
impl Eq for Profile
[src]
impl PartialEq<Profile> for Profile
[src]
impl Serialize for Profile
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,