#[non_exhaustive]pub struct Places {
pub home: Option<PathBuf>,
pub system: SystemPlaces,
pub recent: Vec<PathBuf>,
pub bookmarks: Vec<PathBuf>,
pub bookmark_names: Vec<(PathBuf, String)>,
pub app_sections: Vec<PlaceSection>,
}Expand description
Places the picker lists beside the folder: home, the system’s folders,
the volumes mounted, recent places and bookmarks. Made with
Places::default() and its fields.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.home: Option<PathBuf>§system: SystemPlacesThe system’s folders and volumes (places::system_places).
recent: Vec<PathBuf>§bookmarks: Vec<PathBuf>§bookmark_names: Vec<(PathBuf, String)>The names given to bookmarks (rename_bookmark).
app_sections: Vec<PlaceSection>The application’s sections (Files::place_providers): the picker
lists their folders under its own places.
Implementations§
Source§impl Places
impl Places
Sourcepub fn sections(&self, ctx: &Context) -> Vec<PlaceSection>
pub fn sections(&self, ctx: &Context) -> Vec<PlaceSection>
Every place as sections, the way the picker lists them: home and
the system’s folders (files.places), the devices (files.devices),
recent places (files.recent), bookmarks (files.bookmarks), then
the application’s; empty ones left out, but an application’s with
an empty line or kept (PlaceSection::shown). For a
places::PlacesPanel.
Sourcepub fn bookmark_name(&self, dir: &Path) -> String
pub fn bookmark_name(&self, dir: &Path) -> String
A bookmark’s name: the one given, else its folder’s.
Trait Implementations§
impl StructuralPartialEq for Places
Auto Trait Implementations§
impl Freeze for Places
impl RefUnwindSafe for Places
impl Send for Places
impl Sync for Places
impl Unpin for Places
impl UnsafeUnpin for Places
impl UnwindSafe for Places
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more