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
Auto Trait Implementations§
impl Forget for RawRequest
impl Freeze for RawRequestwhere
*const u8 is !null: Freeze,
PhantomData<String>: Freeze,
PhantomData<(String, String)>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for RawRequest
impl RefUnwindSafe for RawRequest
impl Send for RawRequest
impl Sync for RawRequest
impl Unpin for RawRequest
impl UnsafeUnpin for RawRequestwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
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