Form

Struct Form 

Source
pub struct Form<Other: ExtendableThing> {
    pub op: DefaultedFormOperations,
    pub href: String,
    pub content_type: Option<String>,
    pub content_coding: Option<String>,
    pub subprotocol: Option<String>,
    pub security: Option<Vec<String>>,
    pub scopes: Option<Vec<String>>,
    pub response: Option<ExpectedResponse<Other::ExpectedResponse>>,
    pub additional_responses: Option<Vec<AdditionalExpectedResponse>>,
    pub other: Other::Form,
}
Expand description

The representation of an operation over a Thing.

Fields§

§op: DefaultedFormOperations

The semantic intention of performing the operation(s) described by the form.

§href: String

Target IRI of a link or submission target of a form.

§content_type: Option<String>

A content type.

It is based on a media type (e.g., text/plain) and potential parameters (e.g., charset=utf-8) for the media type (RFC2046).

§content_coding: Option<String>

Content coding values indicate an encoding transformation that has been or can be applied to a representation.

Content codings are primarily used to allow a representation to be compressed or otherwise usefully transformed without losing the identity of its underlying media type and without loss of information.

Examples of content coding include “gzip”, “deflate”, etc. .

§subprotocol: Option<String>

The mechanism by which an interaction will be accomplished for a given protocol when there are multiple options.

§security: Option<Vec<String>>

Set of security definition names, chosen from those defined in security_definitions. These must all be satisfied for access to resources.

§scopes: Option<Vec<String>>

Set of authorization scope identifiers.

The values associated with a form should be chosen from those defined in an OAuth2SecurityScheme active on that form.

§response: Option<ExpectedResponse<Other::ExpectedResponse>>

The expected response from the call to the resource.

The response name contains metadata that is only valid for the primary response messages

§additional_responses: Option<Vec<AdditionalExpectedResponse>>

Additional expected responses.

§other: Other::Form

Form extension.

Trait Implementations§

Source§

impl<Other> Clone for Form<Other>
where Other: ExtendableThing, Other::ExpectedResponse: Clone, Other::Form: Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Other: Debug + ExtendableThing> Debug for Form<Other>
where Other::ExpectedResponse: Debug, Other::Form: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Other: Default + ExtendableThing> Default for Form<Other>
where Other::ExpectedResponse: Default, Other::Form: Default,

Source§

fn default() -> Form<Other>

Returns the “default value” for a type. Read more
Source§

impl<'de, Other: ExtendableThing> Deserialize<'de> for Form<Other>
where Other::Form: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<Other> From<FormBuilder<Other, String, <Other as ExtendableThing>::Form>> for Form<Other>
where Other: ExtendableThing,

Source§

fn from(builder: FormBuilder<Other, String, Other::Form>) -> Self

Converts to this type from the input type.
Source§

impl<Other: PartialEq + ExtendableThing> PartialEq for Form<Other>
where Other::ExpectedResponse: PartialEq, Other::Form: PartialEq,

Source§

fn eq(&self, other: &Form<Other>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Other: ExtendableThing> Serialize for Form<Other>
where Other::Form: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<Other: Eq + ExtendableThing> Eq for Form<Other>
where Other::ExpectedResponse: Eq, Other::Form: Eq,

Source§

impl<Other: ExtendableThing> StructuralPartialEq for Form<Other>

Auto Trait Implementations§

§

impl<Other> Freeze for Form<Other>

§

impl<Other> RefUnwindSafe for Form<Other>

§

impl<Other> Send for Form<Other>
where <Other as ExtendableThing>::Form: Send, <Other as ExtendableThing>::ExpectedResponse: Send,

§

impl<Other> Sync for Form<Other>
where <Other as ExtendableThing>::Form: Sync, <Other as ExtendableThing>::ExpectedResponse: Sync,

§

impl<Other> Unpin for Form<Other>

§

impl<Other> UnwindSafe for Form<Other>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ExtendablePiece for T
where T: Serialize + for<'a> Deserialize<'a>,