pub struct RawRequest { /* private fields */ }Expand description
A Server API request addressed by path segments under {base_url}/api.
Each segment is percent-encoded like PHP rawurlencode: RFC 3986
unreserved characters stay, everything else (including /) is escaped, so
an identifier stays inside its own segment. Empty, . and .. segments
are refused before any request is sent.
Implementations§
Source§impl RawRequest
impl RawRequest
pub fn new<I, S>(method: RawMethod, segments: I) -> Self
pub fn get<I: IntoIterator<Item = S>, S: Into<String>>(segments: I) -> Self
pub fn post<I: IntoIterator<Item = S>, S: Into<String>>(segments: I) -> Self
pub fn put<I: IntoIterator<Item = S>, S: Into<String>>(segments: I) -> Self
pub fn patch<I: IntoIterator<Item = S>, S: Into<String>>(segments: I) -> Self
pub fn delete<I: IntoIterator<Item = S>, S: Into<String>>(segments: I) -> Self
Sourcepub fn query(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn query(self, key: impl Into<String>, value: impl Into<String>) -> Self
Append one query pair. Pairs keep their order.
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Override the client’s whole-request timeout for this request.
Sourcepub fn protocol_version(self, version: impl Into<String>) -> Self
pub fn protocol_version(self, version: impl Into<String>) -> Self
Override the X-Durable-Workflow-Protocol-Version header value.
Defaults to the client’s worker protocol version.
Sourcepub fn control_plane_version(self, version: impl Into<String>) -> Self
pub fn control_plane_version(self, version: impl Into<String>) -> Self
Override the X-Durable-Workflow-Control-Plane-Version header value.
Defaults to CONTROL_PLANE_VERSION.
pub fn method(&self) -> RawMethod
Trait Implementations§
Source§impl Clone for RawRequest
impl Clone for RawRequest
Source§fn clone(&self) -> RawRequest
fn clone(&self) -> RawRequest
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 moreAuto Trait Implementations§
impl Freeze for RawRequest
impl RefUnwindSafe for RawRequest
impl Send for RawRequest
impl Sync for RawRequest
impl Unpin for RawRequest
impl UnwindSafe for RawRequest
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