pub struct DavResponse {
pub status: u16,
pub headers: Vec<(String, String)>,
pub body: Vec<u8>,
}Expand description
A minimal HTTP response shape. Handlers return this; server-side wrapper code (axum / actix / hyper) translates it into the framework’s own response type.
Fields§
§status: u16HTTP status code (e.g. 200, 207, 404).
headers: Vec<(String, String)>Response headers as (name, value) pairs, stored verbatim. The
server-side wrapper is expected to canonicalise header names if its
framework requires it.
body: Vec<u8>Response body bytes. Typically XML for multistatus, plain text for errors, raw iCalendar / vCard for GET on a resource.
Implementations§
Source§impl DavResponse
impl DavResponse
Sourcepub fn with_header(self, name: &str, value: &str) -> Self
pub fn with_header(self, name: &str, value: &str) -> Self
Builder: append a header. Both name and value are stored verbatim;
header-name canonicalisation is the server-side wrapper’s job.
Trait Implementations§
Source§impl Clone for DavResponse
impl Clone for DavResponse
Source§fn clone(&self) -> DavResponse
fn clone(&self) -> DavResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DavResponse
impl RefUnwindSafe for DavResponse
impl Send for DavResponse
impl Sync for DavResponse
impl Unpin for DavResponse
impl UnsafeUnpin for DavResponse
impl UnwindSafe for DavResponse
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