[][src]Enum siren_types::SubEntity

pub enum SubEntity {
    Link {
        inner: EntityLink,
    },
    Embedded {
        inner: Entity,
        rel: Vec<String>,
    },
}

Variants

Fields of Link

inner: EntityLink
Embedded

Fields of Embedded

inner: Entityrel: Vec<String>

Defines the relationship of the sub-entity to its parent, per Web Linking (RFC5988) and Link Relations. MUST be a non-empty array of strings. Required.

Implementations

impl SubEntity[src]

pub fn from_entity(entity: Entity, rels: &[impl Into<String> + Clone]) -> Self[src]

Trait Implementations

impl Debug for SubEntity[src]

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

impl Serialize for SubEntity[src]

Auto Trait Implementations

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.