#[non_exhaustive]pub struct Mount {
pub mount: String,
pub controller: &'static str,
pub expects: Option<&'static str>,
pub prepare: Option<&'static str>,
pub rate_limit_class: Option<&'static str>,
pub max_body_bytes: Option<usize>,
}Expand description
One mounted controller’s declarations — a row of Router::mounts, the
per-mount inventory.
Framework-populated: application code reads these rows, it never
constructs them — which is why the struct is #[non_exhaustive] and can
grow new fields in minor releases. Destructure with .. or read fields
directly.
Unlike Router::rate_limit_classes, the inventory emits a row for
every mounted controller: a controller that declared nothing appears
with expects: None / prepare: None, because for route-family coverage
the omission is the interesting case and has to be representable before
it can be caught.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mount: StringThe controller’s mount path — slash-joined segments, no leading or
trailing slash; "" for a root (or "*") mount. Same convention as
Router::routes.
controller: &'static strThe controller’s type name (Controller::__name).
expects: Option<&'static str>The declared caller expectation — the controller’s floor — from
#[controller(expects = "…")]. None means the controller declared
nothing.
prepare: Option<&'static str>The prepare hook’s written path (e.g. "Self::auth") from
#[controller(prepare = …)], or None when there is no hook.
Presence is the payload; the string is for route dumps.
rate_limit_class: Option<&'static str>The declared rate-limit class from #[controller(rate_limit = "…")].
max_body_bytes: Option<usize>The per-controller body cap from #[controller(max_body_bytes = …)];
None means the controller defers to the server-wide cap.
Trait Implementations§
impl Eq for Mount
impl StructuralPartialEq for Mount
Auto Trait Implementations§
impl Freeze for Mount
impl RefUnwindSafe for Mount
impl Send for Mount
impl Sync for Mount
impl Unpin for Mount
impl UnsafeUnpin for Mount
impl UnwindSafe for Mount
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
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
key and return true if they are equal.