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
link: L
custom_props: C
Methods
impl<C, L: Link> CustomLink<C, L>[src]
impl<C, L: Link> CustomLink<C, L>Trait Implementations
impl<C: Clone, L: Clone> Clone for CustomLink<C, L>[src]
impl<C: Clone, L: Clone> Clone for CustomLink<C, L>fn clone(&self) -> CustomLink<C, L>[src]
fn clone(&self) -> CustomLink<C, L>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl<C: Debug, L: Debug> Debug for CustomLink<C, L>[src]
impl<C: Debug, L: Debug> Debug for CustomLink<C, L>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<C, L> Link for CustomLink<C, L> where
C: DeserializeOwned + Serialize,
L: Link, [src]
impl<C, L> Link for CustomLink<C, L> where
C: DeserializeOwned + Serialize,
L: Link, Auto Trait Implementations
impl<C, L> Send for CustomLink<C, L> where
C: Send,
L: Send,
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,
impl<C, L> Sync for CustomLink<C, L> where
C: Sync,
L: Sync,