pub struct Versions {
pub dir: PathBuf,
}Expand description
$SUPERFLUID_HOME/versions: a directory per release, current, previous, and prefix naming the bin directory that links here.
Fields§
§dir: PathBufImplementations§
Source§impl Versions
impl Versions
pub fn of(home: &Path) -> Versions
pub fn version_dir(&self, v: &str) -> PathBuf
pub fn current(&self) -> Option<String>
pub fn previous(&self) -> Option<String>
pub fn prefix(&self) -> Option<PathBuf>
Sourcepub fn set_current(&self, v: &str) -> Result<(), String>
pub fn set_current(&self, v: &str) -> Result<(), String>
Point current at v, atomically, remembering what it pointed at.
Sourcepub fn prune(&self) -> Result<Vec<String>, String>
pub fn prune(&self) -> Result<Vec<String>, String>
Removes every version but current, previous, one with a keep file, and one a running process started from.
Sourcepub fn link(
&self,
prefix: &Path,
replace_files: bool,
) -> Result<Vec<String>, String>
pub fn link( &self, prefix: &Path, replace_files: bool, ) -> Result<Vec<String>, String>
The links in prefix: the three commands through current, and superfluid-<v> per version. The install script’s
real files are replaced on a migration, except superfluid-workerd while a server still runs from it (it starts its
workers by that path), which a migrating note has the next link finish once nothing runs from there. The note
names the processes that ran from there, by pid and start time: once a link is renamed over a server’s own
executable, macOS may give no path for it, and a server found by its path alone would be missed.
Auto Trait Implementations§
impl Freeze for Versions
impl RefUnwindSafe for Versions
impl Send for Versions
impl Sync for Versions
impl Unpin for Versions
impl UnsafeUnpin for Versions
impl UnwindSafe for Versions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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