[][src]Struct activitystreams::activity::ActorAndObjectOptTarget

pub struct ActorAndObjectOptTarget<Kind> { /* fields omitted */ }

Activity with actor, object, and optional target properties

Implementations

impl<Kind> ActorAndObjectOptTarget<Kind>[src]

pub fn new<T, U>(actor: T, object: U) -> Self where
    T: Into<OneOrMany<AnyBase>>,
    U: Into<OneOrMany<AnyBase>>,
    Kind: Default
[src]

Create a new ActorAndObjectOptTarget Activity

use activitystreams::activity::ActorAndObjectOptTarget;

let activity = ActorAndObjectOptTarget::<String>::new(
    vec![],
    vec![]
);

pub fn new_none_type<T, U>(actor: T, object: U) -> Self where
    T: Into<OneOrMany<AnyBase>>,
    U: Into<OneOrMany<AnyBase>>, 
[src]

Create a new ActorAndObjectOptTarget with None for it's kind property

This means that no type field will be present in serialized JSON

use activitystreams::activity::ActorAndObjectOptTarget;

let activity = ActorAndObjectOptTarget::<()>::new_none_type(vec![], vec![]);

let s = serde_json::to_string(&activity)?;

assert_eq!(s, r#"{"actor":[],"object":[]}"#);

pub fn into_parts(
    self
) -> (OneOrMany<AnyBase>, OneOrMany<AnyBase>, Option<OneOrMany<AnyBase>>, Activity<Kind>)
[src]

Deconstruct the ActorAndObjectOptTarget into its parts

use activitystreams::activity::ActorAndObjectOptTarget;

let activity = ActorAndObjectOptTarget::<String>::new(vec![], vec![]);

let (actor, object, target, activity) = activity.into_parts();

Trait Implementations

impl<Kind> Activity for ActorAndObjectOptTarget<Kind>[src]

impl<Kind> ActorAndObjectRef for ActorAndObjectOptTarget<Kind>[src]

impl<Kind> AsActivity<Kind> for ActorAndObjectOptTarget<Kind>[src]

impl<Kind> AsBase<Kind> for ActorAndObjectOptTarget<Kind>[src]

impl<Kind> AsObject<Kind> for ActorAndObjectOptTarget<Kind>[src]

impl<Kind> Base for ActorAndObjectOptTarget<Kind>[src]

impl<Kind: Clone> Clone for ActorAndObjectOptTarget<Kind>[src]

impl<Kind: Debug> Debug for ActorAndObjectOptTarget<Kind>[src]

impl<'de, Kind> Deserialize<'de> for ActorAndObjectOptTarget<Kind> where
    Kind: Deserialize<'de>, 
[src]

impl<Kind> Extends<Kind> for ActorAndObjectOptTarget<Kind>[src]

type Error = Error

The erro produced must be a StdError

impl<Kind> Object for ActorAndObjectOptTarget<Kind>[src]

impl<Kind> OptTargetRef for ActorAndObjectOptTarget<Kind>[src]

impl<Kind> Serialize for ActorAndObjectOptTarget<Kind> where
    Kind: Serialize
[src]

impl<Kind> TryFrom<ActorAndObjectOptTarget<Kind>> for Object<Kind>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<Kind> TryFrom<Object<Kind>> for ActorAndObjectOptTarget<Kind>[src]

type Error = Error

The type returned in the event of a conversion error.

impl<Kind> UnparsedMut for ActorAndObjectOptTarget<Kind>[src]

Auto Trait Implementations

impl<Kind> RefUnwindSafe for ActorAndObjectOptTarget<Kind> where
    Kind: RefUnwindSafe

impl<Kind> Send for ActorAndObjectOptTarget<Kind> where
    Kind: Send

impl<Kind> Sync for ActorAndObjectOptTarget<Kind> where
    Kind: Sync

impl<Kind> Unpin for ActorAndObjectOptTarget<Kind> where
    Kind: Unpin

impl<Kind> UnwindSafe for ActorAndObjectOptTarget<Kind> where
    Kind: UnwindSafe

Blanket Implementations

impl<T, Kind> ActivityExt<Kind> for T where
    T: AsActivity<Kind>, 
[src]

impl<T> ActorAndObjectRefExt for T where
    T: ActorAndObjectRef
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, Kind> BaseExt<Kind> for T where
    T: AsBase<Kind>, 
[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, Kind> ObjectExt<Kind> for T where
    T: AsObject<Kind>, 
[src]

impl<T> OptTargetRefExt for T where
    T: OptTargetRef
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<T> UnparsedMutExt for T where
    T: UnparsedMut
[src]