pub struct StreamRoute {
pub method: Method,
pub path: &'static str,
pub max_bytes: usize,
}Expand description
One route a module serves in streaming mode (issue #585). path is
relative to the module’s /v1/<name> mount and uses axum’s pattern
syntax: a literal segment, {param} for exactly one segment, or
{*rest} for the remaining one-or-more (/upload, /files/{id},
/files/{*rest}).
max_bytes is this route’s own ceiling, enforced chunk by chunk by
RequestStream and consulted by the router for the declared
content-length pre-check. It replaces Module::max_body_bytes on
this route, and may be raised or lowered freely: unlike the buffered
ceiling it is the precise per-route enforcer, not a coarse guard in front
of the router.
Fields§
§method: Method§path: &'static str§max_bytes: usizeImplementations§
Trait Implementations§
Source§impl Clone for StreamRoute
impl Clone for StreamRoute
Auto Trait Implementations§
impl Freeze for StreamRoute
impl RefUnwindSafe for StreamRoute
impl Send for StreamRoute
impl Sync for StreamRoute
impl Unpin for StreamRoute
impl UnsafeUnpin for StreamRoute
impl UnwindSafe for StreamRoute
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