pub struct MountPath(/* private fields */);Expand description
The place where the plugin mounts Topcoat.
Topcoat always gets the full request path. The plugin never removes the prefix, so declare the Topcoat pages under the prefix.
§Contract
prefix(s)applies thePathPrefixrules, then refuses each reserved namespacer(for example/static) withPathError::Reservedwhens == rorsis underr.root().templates() == ["/", "/{*path}"].prefix(P).templates() == [P, P + "/", P + "/{*path}", "/_topcoat/{*path}"].- For each raw path
p,covers(p)istrueif and only if a matchit 0.8.4 router withtemplates()matchesp.
Implementations§
Source§impl MountPath
impl MountPath
Sourcepub const fn root() -> Self
pub const fn root() -> Self
Returns the root mount. Topcoat gets each path that Autumn does not route.
Sourcepub const fn as_prefix(&self) -> Option<&PathPrefix>
pub const fn as_prefix(&self) -> Option<&PathPrefix>
Returns the prefix, or None for the root mount.
Trait Implementations§
impl Eq for MountPath
impl StructuralPartialEq for MountPath
Auto Trait Implementations§
impl Forget for MountPath
impl Freeze for MountPath
impl RefUnwindSafe for MountPath
impl Send for MountPath
impl Sync for MountPath
impl Unpin for MountPath
impl UnsafeUnpin for MountPath
impl UnwindSafe for MountPath
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
impl<T> CloneAny for T
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§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<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> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
Open a deferred
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP