pub struct Question {Show 36 fields
pub end_time: Option<DateTime>,
pub bcc: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub context: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub cc: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub summary: LangContainer<Property<String>>,
pub media_type: Option<String>,
pub updated: Option<DateTime>,
pub closed: Property<Or<Or<Remotable<Object>, Link>, Or<DateTime, bool>>>,
pub audience: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub generator: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub icon: Property<Or<LinkSubtypes, Remotable<ImageSubtypes>>>,
pub attachment: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub attributed_to: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub image: Property<Or<LinkSubtypes, Remotable<ImageSubtypes>>>,
pub location: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub actor: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub origin: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub result: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub name: LangContainer<Property<String>>,
pub bto: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub tag: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub duration: Option<Duration>,
pub in_reply_to: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub to: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub id: Option<Url>,
pub replies: Property<Remotable<CollectionSubtypes>>,
pub url: Property<Or<Url, LinkSubtypes>>,
pub any_of: Property<Or<Remotable<Object>, Like>>,
pub start_time: Option<DateTime>,
pub object_type: Property<String>,
pub preview: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub target: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub instrument: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>,
pub one_of: Property<Or<Remotable<Object>, Link>>,
pub published: Option<DateTime>,
pub content: LangContainer<Property<String>>,
}Expand description
https://www.w3.org/ns/activitystreams#Question
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 Activity::object property. Either of the Question::any_of and Question::one_of properties may be used to express possible answers, but a Question object must not have both properties.
Fields§
§end_time: Option<DateTime>https://www.w3.org/ns/activitystreams#endTime
The date and time describing the actual or expected ending time of the object. When used with an Activity object, for instance, the Activity::end_time property specifies the moment the activity concluded or is expected to conclude.
bcc: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#bcc
Identifies one or more Objects that are part of the private secondary audience of this Object.
context: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#context
Identifies the context within which the object exists or an activity was performed. The notion of “context” used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.
cc: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#cc
Identifies an Object that is part of the public secondary audience of this Object.
summary: LangContainer<Property<String>>https://www.w3.org/ns/activitystreams#summary
A natural language summarization of the object encoded as HTML. Multiple language tagged summaries may be provided.
media_type: Option<String>https://www.w3.org/ns/activitystreams#mediaType
Identifies the MIME media type of the value of the Object::content property.
If not specified, the Object::content property is assumed to contain text/html content.
updated: Option<DateTime>https://www.w3.org/ns/activitystreams#updated
The date and time at which the object was updated
closed: Property<Or<Or<Remotable<Object>, Link>, Or<DateTime, bool>>>https://www.w3.org/ns/activitystreams#closed
Indicates that a question has been closed, and answers are no longer accepted.
audience: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#audience
Identifies one or more entities that represent the total population of entities for which the object can considered to be relevant.
generator: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#generator
Identifies the entity (e.g. an application) that generated the object.
icon: Property<Or<LinkSubtypes, Remotable<ImageSubtypes>>>https://www.w3.org/ns/activitystreams#icon
Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.
attachment: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#attributedTo
Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.
attributed_to: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#attributedTo
Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.
image: Property<Or<LinkSubtypes, Remotable<ImageSubtypes>>>https://www.w3.org/ns/activitystreams#image
Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.
location: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#location
Indicates one or more physical or logical locations associated with the object.
actor: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#actor
Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple Activity::actors. The Activity::actor may be specified using an indirect Link.
origin: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#origin
Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition “from”. For instance, in the activity “John moved an item to List B from List A”, the origin of the activity is “List A”.
result: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#result
Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.
name: LangContainer<Property<String>>https://www.w3.org/ns/activitystreams#name
A simple, human-readable, plain-text name for the object. HTML markup must not be included. The name may be expressed using multiple language-tagged values.
bto: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#bto
Identifies an Object that is part of the private primary audience of this Object.
tag: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#tag
One or more “tags” that have been associated with an objects. A tag can be any kind of Object. The key difference between Object::attachment and Object::tag is that the former implies association by inclusion, while the latter implies associated by reference.
duration: Option<Duration>https://www.w3.org/ns/activitystreams#duration
When the object describes a time-bound resource,
such as an audio or video,
a meeting, etc, the Object::duration property indicates the object’s approximate duration.
The value must be expressed as an xsd::Duration as defined by xmlschema11-2,
section 3.3.6 (e.g. a period of 5 seconds is represented as PT5S).
in_reply_to: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#inReplyTo
Indicates one or more entities for which this object is considered a response.
to: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#to
Identifies an entity considered to be part of the public primary audience of an Object
id: Option<Url>@id
Id of Object
replies: Property<Remotable<CollectionSubtypes>>https://www.w3.org/ns/activitystreams#replies
Identifies a CollectionSubtypes containing objects considered to be responses to this object.
url: Property<Or<Url, LinkSubtypes>>https://www.w3.org/ns/activitystreams#url
Identifies one or more links to representations of the object
any_of: Property<Or<Remotable<Object>, Like>>https://www.w3.org/ns/activitystreams#anyOf
Identifies an exclusive option for a Question. Use of Question::one_of implies that the Question can have only a single answer. To indicate that a Question can have multiple answers, use Question::one_of.
start_time: Option<DateTime>https://www.w3.org/ns/activitystreams#startTime
The date and time describing the actual or expected starting time of the object. When used with an Activity object, for instance, the Activity::start_time property specifies the moment the activity began or is scheduled to begin.
object_type: Property<String>@type
Kind of ObjectSubtypes
preview: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#preview
Identifies an entity that provides a preview of this object.
target: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#target
Describes the indirect object, or target, of the activity.
The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition “to”.
For instance, in the activity John added a movie to his wishlist, the target of the activity is John’s wishlist.
An activity can have more than one target.
instrument: Property<Or<LinkSubtypes, Remotable<ObjectSubtypes>>>https://www.w3.org/ns/activitystreams#instrument
Identifies one or more objects used (or to be used) in the completion of an Activity.
one_of: Property<Or<Remotable<Object>, Link>>https://www.w3.org/ns/activitystreams#oneOf
Identifies an exclusive option for a Question. Use of Question::one_of implies that the Question can have only a single answer. To indicate that a Question can have multiple answers, use Question::any_of.
published: Option<DateTime>https://www.w3.org/ns/activitystreams#published
The date and time at which the object was published
content: LangContainer<Property<String>>https://www.w3.org/ns/activitystreams#content
The content or textual representation of the Object encoded as a JSON string. By default, the value of content is HTML. The Object::media_type property can be used in the object to indicate a different content type. The content may be expressed using multiple language-tagged values.
Implementations§
Source§impl Question
impl Question
Sourcepub fn builder() -> QuestionBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> QuestionBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building Question.
On the builder, call .end_time(...), .bcc(...), .context(...), .cc(...), .summary(...), .media_type(...), .updated(...), .closed(...), .audience(...), .generator(...), .icon(...), .attachment(...), .attributed_to(...), .image(...), .location(...), .actor(...), .origin(...), .result(...), .name(...), .bto(...), .tag(...), .duration(...), .in_reply_to(...), .to(...), .id(...), .replies(...), .url(...), .any_of(...), .start_time(...), .object_type(...), .preview(...), .target(...), .instrument(...), .one_of(...), .published(...), .content(...) to set the values of the fields.
Finally, call .build() to create the instance of Question.