#[non_exhaustive]pub struct Place {
pub label: String,
pub path: PathBuf,
pub origin: PlaceOrigin,
pub separator_thickness: Option<u32>,
}Expand description
A single place entry shown in the left “Places” pane.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.label: StringDisplay name shown in UI.
path: PathBufTarget directory path.
origin: PlaceOriginOrigin of the entry (user vs code).
separator_thickness: Option<u32>Optional UI separator thickness (in pixels).
When set, this item is treated as a non-interactive separator instead of a navigable place.
Implementations§
Source§impl Place
impl Place
Sourcepub fn new(label: impl Into<String>, path: PathBuf, origin: PlaceOrigin) -> Self
pub fn new(label: impl Into<String>, path: PathBuf, origin: PlaceOrigin) -> Self
Creates a new place entry.
Sourcepub fn user(label: impl Into<String>, path: PathBuf) -> Self
pub fn user(label: impl Into<String>, path: PathBuf) -> Self
Convenience constructor for a user-defined place.
Sourcepub fn code(label: impl Into<String>, path: PathBuf) -> Self
pub fn code(label: impl Into<String>, path: PathBuf) -> Self
Convenience constructor for a code-defined place.
Sourcepub fn is_separator(&self) -> bool
pub fn is_separator(&self) -> bool
Returns whether this item is a separator row.
Trait Implementations§
impl Eq for Place
impl StructuralPartialEq for Place
Auto Trait Implementations§
impl Freeze for Place
impl RefUnwindSafe for Place
impl Send for Place
impl Sync for Place
impl Unpin for Place
impl UnsafeUnpin for Place
impl UnwindSafe for Place
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.