pub enum StartupRoot {
Home,
Last,
Path(String),
Bookmarks,
}Expand description
Where the panel opens when launched without an explicit path argument.
In TOML this is a single value: "home" (the default), "last",
"bookmarks" (open with the bookmarks section showing and no directory
pane), or a table naming a fixed directory — { path = "/some/dir" }. A
leading ~ in the path expands to $HOME.
Variants§
Home
Always open the user’s home directory.
Last
Reopen the most recently used directory (persisted between launches).
Path(String)
Always open the named directory.
Bookmarks
Open with the bookmarks section as the initial view and no directory pane.
Implementations§
Source§impl StartupRoot
impl StartupRoot
Sourcepub fn resolve(&self, last: Option<PathBuf>) -> Option<PathBuf>
pub fn resolve(&self, last: Option<PathBuf>) -> Option<PathBuf>
Resolve the directory to open, given the last-used directory from session
state. None means “fall back to home” (unknown/unusable path).
Sourcepub fn is_bookmarks(&self) -> bool
pub fn is_bookmarks(&self) -> bool
Whether this selects the bookmarks view rather than a directory.
Trait Implementations§
Source§impl Clone for StartupRoot
impl Clone for StartupRoot
Source§impl Debug for StartupRoot
impl Debug for StartupRoot
Source§impl Default for StartupRoot
impl Default for StartupRoot
Source§impl<'de> Deserialize<'de> for StartupRoot
impl<'de> Deserialize<'de> for StartupRoot
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for StartupRoot
Source§impl PartialEq for StartupRoot
impl PartialEq for StartupRoot
Source§impl Serialize for StartupRoot
impl Serialize for StartupRoot
impl StructuralPartialEq for StartupRoot
Auto Trait Implementations§
impl Freeze for StartupRoot
impl RefUnwindSafe for StartupRoot
impl Send for StartupRoot
impl Sync for StartupRoot
impl Unpin for StartupRoot
impl UnsafeUnpin for StartupRoot
impl UnwindSafe for StartupRoot
Blanket Implementations§
Source§impl<C> AsyncPosition<()> for C
impl<C> AsyncPosition<()> for C
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
Converts
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> ⓘ
Converts
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