pub struct Response {
pub status: Status,
pub sent: DateTime<Utc>,
pub agent: String,
pub language: String,
pub cookies: Vec<Cookie>,
pub encryption: Encryption,
pub content_type: ContentType,
pub content: Vec<u8>,
/* private fields */
}Fields§
§status: Status§sent: DateTime<Utc>§agent: String§language: String§encryption: Encryption§content_type: ContentType§content: Vec<u8>Implementations§
Source§impl Response
impl Response
pub fn create(status: Status, agent: String) -> Response
pub fn with_time(self, sent: DateTime<Utc>) -> Response
pub fn with_encryption( self, encryption: Encryption, key: Key<Aes256>, ) -> Response
pub fn with_language(self, language: String) -> Response
pub fn with_content( self, content_type: ContentType, content: Vec<u8>, ) -> Response
pub fn decrypt_content(&mut self, key: &[u8]) -> Vec<u8> ⓘ
pub fn with_content_string( self, content_type: ContentType, content: String, ) -> Response
pub fn build(self) -> String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
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
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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