pub struct PagesConfig {
pub dir: PathBuf,
pub origin: Option<String>,
pub listen: Option<SocketAddr>,
}Expand description
Where pages are served from: a directory, and optionally their own origin and listener.
Fields§
§dir: PathBufWhere pages are kept.
origin: Option<String>[pages] origin: the pages’ own origin, such as https://pages.example.net. Without
one, pages are served under /pages/ on the API’s origin, by design.
listen: Option<SocketAddr>[pages] listen: the loopback address of the pages’ own listener (with origin).
Implementations§
Source§impl PagesConfig
impl PagesConfig
Sourcepub fn with_origin(self, origin: impl Into<String>, listen: SocketAddr) -> Self
pub fn with_origin(self, origin: impl Into<String>, listen: SocketAddr) -> Self
Serves pages on their own origin and listen address.
Trait Implementations§
Source§impl Clone for PagesConfig
impl Clone for PagesConfig
Source§impl Debug for PagesConfig
impl Debug for PagesConfig
impl Eq for PagesConfig
Source§impl PartialEq for PagesConfig
impl PartialEq for PagesConfig
impl StructuralPartialEq for PagesConfig
Auto Trait Implementations§
impl Freeze for PagesConfig
impl RefUnwindSafe for PagesConfig
impl Send for PagesConfig
impl Sync for PagesConfig
impl Unpin for PagesConfig
impl UnsafeUnpin for PagesConfig
impl UnwindSafe for PagesConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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,
§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<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
Checks if this value is equivalent to the given key. Read more
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.