pub struct StillStore { /* private fields */ }Implementations§
Source§impl StillStore
impl StillStore
Sourcepub fn default_location() -> Result<Self>
pub fn default_location() -> Result<Self>
The default store: <local data dir>/clairlune/current (Local AppData on
Windows, so large regenerated images never roam with the profile).
pub fn dir(&self) -> &Path
Sourcepub fn write(&self, monitor_id: &str, png: &[u8]) -> Result<PathBuf>
pub fn write(&self, monitor_id: &str, png: &[u8]) -> Result<PathBuf>
Writes a still for a monitor under a new, absolute file name.
Sourcepub fn remember_if_users(&self, snapshot: &Snapshot) -> Result<bool>
pub fn remember_if_users(&self, snapshot: &Snapshot) -> Result<bool>
Saves the wallpaper restore returns to, monitor by monitor: a
monitor showing the user’s own image is remembered (a wallpaper they
pick later replaces the one saved), one showing a still of Clairlune’s
keeps what was saved for it. So Clairlune never remembers itself, and
a monitor plugged in while it runs doesn’t lose the others’ originals.
Returns whether anything changed.
Sourcepub fn forget_original(&self) -> Result<()>
pub fn forget_original(&self) -> Result<()>
Forgets the saved wallpaper (after restoring it).
Sourcepub fn clear_stills(&self) -> usize
pub fn clear_stills(&self) -> usize
Deletes every still for every monitor (after restoring).
Auto Trait Implementations§
impl Forget for StillStore
impl Freeze for StillStore
impl Move for StillStore
impl RefUnwindSafe for StillStore
impl Send for StillStore
impl Sync for StillStore
impl Unpin for StillStore
impl UnsafeUnpin for StillStore
impl UnwindSafe for StillStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.