[][src]Struct activitystreams::activity::Question

pub struct Question { /* fields omitted */ }

Represents a question being asked.

Question objects are an extension of IntransitiveActivity. That is, the Question object is an Activity, but the direct object is the question itself and therefore it would not contain an object property.

Either of the anyOf and oneOf properties MAY be used to express possible answers, but a Question object MUST NOT have both properties.

Implementations

impl Question[src]

pub fn new() -> Self[src]

Create a new Question Activity

use activitystreams::activity::Question;

let activity = Question::new();

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

Deconstruct the Question into its parts

use activitystreams::activity::Question;

let activity = Question::new();

let (one_of, any_of, activity) = activity.into_parts();

Trait Implementations

impl Activity for Question[src]

impl AsActivity<QuestionType> for Question[src]

impl AsBase<QuestionType> for Question[src]

impl AsObject<QuestionType> for Question[src]

impl AsQuestion for Question[src]

impl Base for Question[src]

impl Clone for Question[src]

impl Debug for Question[src]

impl<'de> Deserialize<'de> for Question[src]

impl Extends<QuestionType> for Question[src]

type Error = Error

The erro produced must be a StdError

impl IntransitiveActivity for Question[src]

impl Object for Question[src]

impl Serialize for Question[src]

impl TryFrom<Object<QuestionType>> for Question[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Question> for Object<QuestionType>[src]

type Error = Error

The type returned in the event of a conversion error.

impl UnparsedMut for Question[src]

Auto Trait Implementations

Blanket Implementations

impl<T, Kind> ActivityExt<Kind> for T where
    T: AsActivity<Kind>, 
[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, Kind> ExtendsExt<Kind> for T where
    T: Extends<Kind>,
    <T as Extends<Kind>>::Error: From<Error>, 
[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> QuestionExt for T where
    T: AsQuestion
[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]