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