pub struct StaticResponse {
pub status_code: u16,
pub status_text: &'static str,
pub content_type: &'static str,
pub body: Vec<u8>,
pub content_length: u64,
}Expand description
A bounded static response selected from one packaged app artifact.
§Fields
status_code: Stored field onStaticResponse.status_text: Stored field onStaticResponse.content_type: Stored field onStaticResponse.body: Stored field onStaticResponse.content_length: Stored field onStaticResponse.
§Examples
ⓘ
let _ = std::mem::size_of::<pharos_runtime_static::artifact_server::StaticResponse>();§Related
crate::artifact_serverfor constructors, helpers, and neighboring runtime types.
Fields§
§status_code: u16HTTP status code.
status_text: &'static strHTTP reason phrase.
content_type: &'static strMIME type for the response body.
body: Vec<u8>Response bytes. Empty for HEAD responses.
content_length: u64Original body length, retained for HEAD and header generation.
Trait Implementations§
Source§impl Clone for StaticResponse
impl Clone for StaticResponse
Source§fn clone(&self) -> StaticResponse
fn clone(&self) -> StaticResponse
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 moreSource§impl Debug for StaticResponse
impl Debug for StaticResponse
Source§impl PartialEq for StaticResponse
impl PartialEq for StaticResponse
Source§fn eq(&self, other: &StaticResponse) -> bool
fn eq(&self, other: &StaticResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for StaticResponse
impl StructuralPartialEq for StaticResponse
Auto Trait Implementations§
impl Freeze for StaticResponse
impl RefUnwindSafe for StaticResponse
impl Send for StaticResponse
impl Sync for StaticResponse
impl Unpin for StaticResponse
impl UnsafeUnpin for StaticResponse
impl UnwindSafe for StaticResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.