pub struct ProjectPaths { /* private fields */ }Expand description
The paths of a site project.
§Example
use adk_website::deploy::project::ProjectPaths;
let paths = ProjectPaths::new("/srv/bakery");
assert!(paths.journal().ends_with("data/updates"));
assert!(paths.key_file("release").ends_with("data/keys/release.jwk"));Implementations§
Source§impl ProjectPaths
impl ProjectPaths
Sourcepub fn experiments(&self) -> PathBuf
pub fn experiments(&self) -> PathBuf
Experiment records.
Sourcepub fn kernel_database(&self) -> String
pub fn kernel_database(&self) -> String
The kernel database the site runs on (spec 3.5 §7.22, A-I22): the agency’s
data/kernel.db when an agency.toml beside the project lists it, as
serve_agency serves it, else the project’s own.
§Example
use adk_website::deploy::ProjectPaths;
let dir = tempfile::tempdir().unwrap();
std::fs::write(dir.path().join("agency.toml"), "[[site]]\ndomain = \"bakery.example\"\ndir = \"bakery\"\n").unwrap();
let site = ProjectPaths::new(dir.path().join("bakery"));
assert_eq!(site.kernel_database(), ProjectPaths::new(dir.path()).database("kernel"));
let alone = ProjectPaths::new(dir.path().join("notes"));
assert_eq!(alone.kernel_database(), alone.database("kernel"));Sourcepub fn well_known(&self) -> PathBuf
pub fn well_known(&self) -> PathBuf
Files released under /.well-known/.
Sourcepub fn static_dir(&self) -> PathBuf
pub fn static_dir(&self) -> PathBuf
Files released at their own paths.
Trait Implementations§
Source§impl Clone for ProjectPaths
impl Clone for ProjectPaths
Source§impl Debug for ProjectPaths
impl Debug for ProjectPaths
impl Eq for ProjectPaths
Source§impl PartialEq for ProjectPaths
impl PartialEq for ProjectPaths
impl StructuralPartialEq for ProjectPaths
Auto Trait Implementations§
impl Forget for ProjectPaths
impl Freeze for ProjectPaths
impl Move for ProjectPaths
impl RefUnwindSafe for ProjectPaths
impl Send for ProjectPathswhere
RawVecInner: Send,
impl Sync for ProjectPathswhere
RawVecInner: Sync,
impl Unpin for ProjectPaths
impl UnsafeUnpin for ProjectPaths
impl UnwindSafe for ProjectPathswhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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