pub struct SessionPaths {
pub root: PathBuf,
pub socket: PathBuf,
pub pid: PathBuf,
pub layout: PathBuf,
pub panes: PathBuf,
}Fields§
§root: PathBuf§socket: PathBuf§pid: PathBuf§layout: PathBuf§panes: PathBufImplementations§
Source§impl SessionPaths
impl SessionPaths
Sourcepub fn sessions_root_from_home() -> Result<PathBuf>
pub fn sessions_root_from_home() -> Result<PathBuf>
Return the root directory containing all muxr session directories under $HOME.
§Errors
HOMEis unavailable in the current environment.
Sourcepub fn sessions_root_from_home_path(home: PathBuf) -> PathBuf
pub fn sessions_root_from_home_path(home: PathBuf) -> PathBuf
Return the root directory containing all muxr session directories under an explicit home path.
Sourcepub fn from_home(session: &SessionName) -> Result<Self>
pub fn from_home(session: &SessionName) -> Result<Self>
Build muxr session paths under $HOME/.local/state/muxr.
§Errors
HOMEis unavailable in the current environment.- The derived Unix socket path is too long for the platform socket address.
Sourcepub fn from_sessions_root_path(
sessions_root: &Path,
session: &SessionName,
) -> Result<Self>
pub fn from_sessions_root_path( sessions_root: &Path, session: &SessionName, ) -> Result<Self>
Build muxr session paths from an explicit sessions root.
§Errors
- The sessions root has no parent state directory.
- The derived Unix socket path is too long for the platform socket address.
Sourcepub fn logs_root(&self) -> Result<PathBuf>
pub fn logs_root(&self) -> Result<PathBuf>
Build the centralized directory containing muxr server logs.
§Errors
- The session root path has no parent state root.
Sourcepub fn server_log_path(
&self,
session: &SessionName,
timestamp: &ServerLogTimestamp,
pid: u32,
) -> Result<PathBuf>
pub fn server_log_path( &self, session: &SessionName, timestamp: &ServerLogTimestamp, pid: u32, ) -> Result<PathBuf>
Build the centralized server log path for one muxr server process start.
§Errors
- The session root path has no parent state root.
Sourcepub fn server_log_file_pattern(session: &SessionName, pid: u32) -> String
pub fn server_log_file_pattern(session: &SessionName, pid: u32) -> String
Return the pid-scoped server log filename pattern used in client startup failure hints.
The timestamp is chosen inside the server, so the client can only know the session name and spawned pid.
fn from_home_path(home: PathBuf, session: &SessionName) -> Result<Self>
fn from_state_root_path( state_root: &Path, session: &SessionName, ) -> Result<Self>
fn state_root_from_home_path(home: PathBuf) -> PathBuf
fn state_root(&self) -> Result<&Path>
Trait Implementations§
Source§impl Clone for SessionPaths
impl Clone for SessionPaths
Source§fn clone(&self) -> SessionPaths
fn clone(&self) -> SessionPaths
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionPaths
impl Debug for SessionPaths
Source§impl<'de> Deserialize<'de> for SessionPaths
impl<'de> Deserialize<'de> for SessionPaths
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SessionPaths
Source§impl PartialEq for SessionPaths
impl PartialEq for SessionPaths
Source§impl Serialize for SessionPaths
impl Serialize for SessionPaths
impl StructuralPartialEq for SessionPaths
Auto Trait Implementations§
impl Freeze for SessionPaths
impl RefUnwindSafe for SessionPaths
impl Send for SessionPaths
impl Sync for SessionPaths
impl Unpin for SessionPaths
impl UnsafeUnpin for SessionPaths
impl UnwindSafe for SessionPaths
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.