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]
Trait Implementations
impl<C: Clone, L: Clone> Clone for CustomLink<C, L>
[src]
fn clone(&self) -> CustomLink<C, L>
[src]
Returns a copy of the value. Read more
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]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<C, L> Link for CustomLink<C, L> where
C: DeserializeOwned + Serialize,
L: Link,
[src]
C: DeserializeOwned + Serialize,
L: Link,
Auto Trait Implementations
impl<C, L> Send for CustomLink<C, L> where
C: Send,
L: Send,
C: Send,
L: Send,
impl<C, L> Sync for CustomLink<C, L> where
C: Sync,
L: Sync,
C: Sync,
L: Sync,