Struct activitystreams_types::CustomObject [−][src]
pub struct CustomObject<C, O> {
pub object: O,
pub custom_props: C,
}A custom type extending Object
CustomObject allows for providing a pre-defined Link type, and a set of extending properties, and treating those two items as a single Object type.
This type can also be used to extend any type deriving from Object, such as Actor, Activity, or Collection.
Example
use activitystreams_types::{ CustomObject, object::Video, }; struct MyProps { some_prop: String, } fn main() { let video = Video::default(); let extended_video = CustomObject::new(video, MyProps { some_prop: "hey".to_owned() }); }
Fields
object: O
custom_props: C
Methods
impl<C, O: Object> CustomObject<C, O>[src]
impl<C, O: Object> CustomObject<C, O>Trait Implementations
impl<C: Clone, O: Clone> Clone for CustomObject<C, O>[src]
impl<C: Clone, O: Clone> Clone for CustomObject<C, O>fn clone(&self) -> CustomObject<C, O>[src]
fn clone(&self) -> CustomObject<C, O>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, O: Debug> Debug for CustomObject<C, O>[src]
impl<C: Debug, O: Debug> Debug for CustomObject<C, O>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, O> Object for CustomObject<C, O> where
C: DeserializeOwned + Serialize,
O: Object, [src]
impl<C, O> Object for CustomObject<C, O> where
C: DeserializeOwned + Serialize,
O: Object, impl<C, O> Actor for CustomObject<C, O> where
C: DeserializeOwned + Serialize,
O: Actor, [src]
impl<C, O> Actor for CustomObject<C, O> where
C: DeserializeOwned + Serialize,
O: Actor, impl<C, O> Collection for CustomObject<C, O> where
C: DeserializeOwned + Serialize,
O: Collection, [src]
impl<C, O> Collection for CustomObject<C, O> where
C: DeserializeOwned + Serialize,
O: Collection, impl<C, O> CollectionPage for CustomObject<C, O> where
C: DeserializeOwned + Serialize,
O: CollectionPage, [src]
impl<C, O> CollectionPage for CustomObject<C, O> where
C: DeserializeOwned + Serialize,
O: CollectionPage, impl<C, O> Activity for CustomObject<C, O> where
C: DeserializeOwned + Serialize,
O: Activity, [src]
impl<C, O> Activity for CustomObject<C, O> where
C: DeserializeOwned + Serialize,
O: Activity, impl<C, O> IntransitiveActivity for CustomObject<C, O> where
C: DeserializeOwned + Serialize,
O: IntransitiveActivity, [src]
impl<C, O> IntransitiveActivity for CustomObject<C, O> where
C: DeserializeOwned + Serialize,
O: IntransitiveActivity, Auto Trait Implementations
impl<C, O> Send for CustomObject<C, O> where
C: Send,
O: Send,
impl<C, O> Send for CustomObject<C, O> where
C: Send,
O: Send, impl<C, O> Sync for CustomObject<C, O> where
C: Sync,
O: Sync,
impl<C, O> Sync for CustomObject<C, O> where
C: Sync,
O: Sync,