Struct sozu_command_lib::response::WorkerResponse  
source · pub struct WorkerResponse {
    pub id: MessageId,
    pub status: ResponseStatus,
    pub message: String,
    pub content: Option<ResponseContent>,
}Expand description
A response as sent by a worker
Fields§
§id: MessageId§status: ResponseStatus§message: String§content: Option<ResponseContent>Implementations§
source§impl WorkerResponse
 
impl WorkerResponse
pub fn ok<T>(id: T) -> Selfwhere
    T: ToString,
pub fn ok_with_content<T>(id: T, content: ResponseContent) -> Selfwhere
    T: ToString,
pub fn error<T, U>(id: T, error: U) -> Self
pub fn processing<T>(id: T) -> Selfwhere
    T: ToString,
pub fn status<T>(id: T, status: ResponseStatus) -> Selfwhere
    T: ToString,
Trait Implementations§
source§impl Clone for WorkerResponse
 
impl Clone for WorkerResponse
source§fn clone(&self) -> WorkerResponse
 
fn clone(&self) -> WorkerResponse
Returns a copy of the value. Read more
1.0.0 · 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 WorkerResponse
 
impl Debug for WorkerResponse
source§impl<'de> Deserialize<'de> for WorkerResponse
 
impl<'de> Deserialize<'de> for WorkerResponse
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for WorkerResponse
 
impl Display for WorkerResponse
source§impl PartialEq for WorkerResponse
 
impl PartialEq for WorkerResponse
source§fn eq(&self, other: &WorkerResponse) -> bool
 
fn eq(&self, other: &WorkerResponse) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.source§impl Serialize for WorkerResponse
 
impl Serialize for WorkerResponse
impl Eq for WorkerResponse
impl StructuralEq for WorkerResponse
impl StructuralPartialEq for WorkerResponse
Auto Trait Implementations§
impl RefUnwindSafe for WorkerResponse
impl Send for WorkerResponse
impl Sync for WorkerResponse
impl Unpin for WorkerResponse
impl UnwindSafe for WorkerResponse
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
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
§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
Checks if this value is equivalent to the given key. Read more
§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.