Struct activitystreams_types::CustomLink[][src]

pub struct CustomLink<C, L> {
    pub link: L,
    pub custom_props: C,
}

A custom type extending Link

CustomLink allows for providing a pre-defined Link type, and a set of extending properties, and treating those two items as a single Link type.

Example

use activitystreams_types::{
    CustomLink,
    link::Mention,
};

struct MyProps {
    some_prop: String,
}

fn main() {
    let mention = Mention::default();
    let extended_mention = CustomLink::new(mention, MyProps { some_prop: "hey".to_owned() });
}

Fields

Methods

impl<C, L: Link> CustomLink<C, L>
[src]

Trait Implementations

impl<C: Clone, L: Clone> Clone for CustomLink<C, L>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<C: Debug, L: Debug> Debug for CustomLink<C, L>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<C, L> Send for CustomLink<C, L> where
    C: Send,
    L: Send

impl<C, L> Sync for CustomLink<C, L> where
    C: Sync,
    L: Sync