pub struct Request {
pub host: Arc<str>,
pub port: u16,
pub tls: bool,
pub method: Arc<str>,
pub path: Arc<str>,
pub headers: Vec<(Arc<str>, Arc<str>)>,
pub body: Arc<str>,
}Expand description
One outbound request.
The host is not part of the body of the program: it is the argument of the net.out(host)
atom the call site performs, which is what becomes a NetworkPolicy peer (§6.5). Everything else
here is data a program computed.
Fields§
§host: Arc<str>§port: u16§tls: boolWhether the exchange happens inside a TLS session whose certificate names Request::host.
A field rather than a scheme in the path, because the host is already the atom the call site performs and a URL would give a program a second place to write it.
method: Arc<str>§path: Arc<str>Origin-form: /v1/todos?limit=10. Sent as written — this seam does not encode, because a
program that built a path is the only thing that knows what in it was data.
headers: Vec<(Arc<str>, Arc<str>)>§body: Arc<str>Trait Implementations§
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