pub struct Place {
pub config: PathBuf,
pub base: PathBuf,
pub dir: String,
pub collective: Option<String>,
}Expand description
Where a node finds its collective. Kept instead of a fixed Route so every session re-reads the
config: setting the collective to share: local, adding the repo to off or breaking the file
stops a running serve at its next session, not at its next restart.
Fields§
§config: PathBufThe collectives config (BORG_CONFIG).
base: PathBufThe root store (BORG_HOME).
dir: StringThe directory whose collective this is (--dir).
collective: Option<String>The collective named directly (--collective, and join before any repo routes to it):
it must be listed in the config, and its share still decides.
Implementations§
Source§impl Place
impl Place
pub fn from_env(dir: &str) -> Place
Sourcepub fn named(&self, name: &str) -> Place
pub fn named(&self, name: &str) -> Place
The same machine, the collective named name instead of the one a directory routes to.
Sourcepub fn route(&self) -> Route
pub fn route(&self) -> Route
The route as of now; a broken config never leaks a repo into a collective, it routes off.
Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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