pub struct UserSettings {
pub channels: Vec<Channel>,
pub notifiers: Vec<Notifier>,
pub path: PathBuf,
pub last_run_at_path: PathBuf,
}Fields§
§channels: Vec<Channel>§notifiers: Vec<Notifier>§path: PathBuf§last_run_at_path: PathBufImplementations§
source§impl UserSettings
impl UserSettings
pub fn init(path: Option<&PathBuf>) -> Result<Self>
pub fn read(path: Option<&PathBuf>) -> Result<Self>
pub fn sync(&self, path: Option<&PathBuf>) -> Result<()>
pub fn default_path() -> PathBuf
pub fn get_last_run_at(&self) -> DateTime<Utc>
pub fn update_last_run_at(&self) -> Result<()>
pub fn get_channel_by_id(&self, channel_id: &str) -> Option<Channel>
pub fn get_channel_by_handle(&self, handle: &str) -> Option<Channel>
Trait Implementations§
source§impl Debug for UserSettings
impl Debug for UserSettings
source§impl<'de> Deserialize<'de> for UserSettings
impl<'de> Deserialize<'de> for UserSettings
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 Display for UserSettings
impl Display for UserSettings
source§impl PartialEq for UserSettings
impl PartialEq for UserSettings
source§impl Serialize for UserSettings
impl Serialize for UserSettings
impl StructuralPartialEq for UserSettings
Auto Trait Implementations§
impl Freeze for UserSettings
impl RefUnwindSafe for UserSettings
impl Send for UserSettings
impl Sync for UserSettings
impl Unpin for UserSettings
impl UnwindSafe for UserSettings
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