pub struct SendfileState {
pub active: bool,
pub path: Option<String>,
pub body: Option<Bytes>,
pub served: bool,
}Expand description
Tracks sendfile middleware state for a response
Fields§
§active: boolWhether sendfile is engaged for this response
path: Option<String>Optional path for logging/diagnostics
body: Option<Bytes>In-memory body to serve (loaded once when active)
served: boolFlag indicating if body has been emitted downstream
Implementations§
Trait Implementations§
Source§impl Debug for SendfileState
impl Debug for SendfileState
Source§impl Default for SendfileState
impl Default for SendfileState
Source§fn default() -> SendfileState
fn default() -> SendfileState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SendfileState
impl RefUnwindSafe for SendfileState
impl Send for SendfileState
impl Sync for SendfileState
impl Unpin for SendfileState
impl UnwindSafe for SendfileState
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