[][src]Struct siren_types::Field

pub struct Field {
    pub name: String,
    pub class: Vec<String>,
    pub _type: Option<String>,
    pub value: Option<String>,
    pub title: Option<String>,
}

Fields

name: String

A name describing the control. Field names MUST be unique within the set of fields for an action. The behaviour of clients when parsing a Siren document that violates this constraint is undefined. Required.

class: Vec<String>

Describes aspects of the field based on the current representation. Possible values are implementation-dependent and should be documented. MUST be an array of strings. Optional.

_type: Option<String>

The input type of the field. This may include any of the following input types specified in HTML5: hidden, text, search, tel, url, email, password, datetime, date, month, week, time, datetime-local, number, range, color, checkbox, radio, file When missing, the default value is text. Serialization of these fields will depend on the value of the action's type attribute. See type under Actions, above. Optional.

value: Option<String>

A value assigned to the field. Optional.

title: Option<String>

Textual annotation of a field. Clients may use this as a label. Optional.

Trait Implementations

impl Debug for Field[src]

impl<'de> Deserialize<'de> for Field[src]

impl Serialize for Field[src]

Auto Trait Implementations

impl RefUnwindSafe for Field

impl Send for Field

impl Sync for Field

impl Unpin for Field

impl UnwindSafe for Field

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.