pub struct RecentFiles { /* private fields */ }Expand description
最近文件列表;最新在最前,重复 push 会前移而不新增。
Implementations§
Source§impl RecentFiles
impl RecentFiles
pub fn new(limit: usize) -> Self
pub fn push(&mut self, path: impl Into<PathBuf>)
pub fn remove(&mut self, path: &Path)
pub fn clear(&mut self)
pub fn iter(&self) -> impl Iterator<Item = &PathBuf>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn is_dirty(&self) -> bool
pub fn load_from_text(&mut self, text: &str)
pub fn to_text(&self) -> String
Trait Implementations§
Source§impl Clone for RecentFiles
impl Clone for RecentFiles
Auto Trait Implementations§
impl Forget for RecentFiles
impl Freeze for RecentFiles
impl Move for RecentFiles
impl RefUnwindSafe for RecentFiles
impl Send for RecentFileswhere
RawVecInner: Send,
impl Sync for RecentFileswhere
RawVecInner: Sync,
impl Unpin for RecentFiles
impl UnsafeUnpin for RecentFiles
impl UnwindSafe for RecentFileswhere
RawVecInner: UnwindSafe,
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