pub struct Values { /* private fields */ }Expand description
Parameters and a body for one operation, keyed on wire names.
Nothing here is checked against a document — that happens once, in
Invocation::new, so there is exactly one place that decides what
satisfies an operation.
Implementations§
Source§impl Values
impl Values
pub fn new() -> Self
Sourcepub fn param(self, name: impl Into<String>, value: impl ToString) -> Self
pub fn param(self, name: impl Into<String>, value: impl ToString) -> Self
One parameter, under the name the document gives it.
Sourcepub fn maybe(
self,
name: impl Into<String>,
value: Option<impl ToString>,
) -> Self
pub fn maybe( self, name: impl Into<String>, value: Option<impl ToString>, ) -> Self
The same, for an optional parameter: None adds nothing.
pub fn json(self, value: Value) -> Self
pub fn raw(self, bytes: Vec<u8>) -> Self
pub fn multipart(self, parts: Vec<Part>) -> Self
Sourcepub fn body(self, body: Option<Payload>) -> Self
pub fn body(self, body: Option<Payload>) -> Self
Attach body when there is one; leave the body alone when there is not.
pub fn params(&self) -> &[(String, String)]
pub fn payload(&self) -> Option<&Payload>
Trait Implementations§
impl Eq for Values
impl StructuralPartialEq for Values
Auto Trait Implementations§
impl Freeze for Values
impl RefUnwindSafe for Values
impl Send for Values
impl Sync for Values
impl Unpin for Values
impl UnsafeUnpin for Values
impl UnwindSafe for Values
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.