#[non_exhaustive]pub struct EdgeRequest {
pub method: String,
pub path: String,
pub headers: HashMap<String, String>,
pub body: Vec<u8>,
}Expand description
Environment-agnostic HTTP request payload designed for maximum compatibility.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.method: StringHTTP method (e.g., “GET”, “POST”).
path: StringRequest URL path (e.g., “/users”).
headers: HashMap<String, String>Collection of request headers.
body: Vec<u8>Raw request body in bytes.
Implementations§
Source§impl EdgeRequest
impl EdgeRequest
Sourcepub fn new(method: impl Into<String>, path: impl Into<String>) -> Self
pub fn new(method: impl Into<String>, path: impl Into<String>) -> Self
Creates a new EdgeRequest using constructor and builder pattern for backwards compatibility.
Trait Implementations§
Source§impl Clone for EdgeRequest
impl Clone for EdgeRequest
Auto Trait Implementations§
impl Freeze for EdgeRequest
impl RefUnwindSafe for EdgeRequest
impl Send for EdgeRequest
impl Sync for EdgeRequest
impl Unpin for EdgeRequest
impl UnsafeUnpin for EdgeRequest
impl UnwindSafe for EdgeRequest
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