Add docs from spec

This commit is contained in:
asonix 2020-05-17 12:36:06 -05:00
parent 8b917e9b7a
commit 0bedf94797
3 changed files with 54 additions and 21 deletions

View file

@ -590,31 +590,31 @@ pub trait ApActorExt<Inner>: AsApActor<Inner> {
}
}
/// The ActivityStreams Application type
/// Describes a software application.
///
/// This is just an alias for `Object<ApplicationType>` because there's no fields inherent to
/// Application that aren't already present on an Object.
pub type Application = Object<ApplicationType>;
/// The ActivityStreams Group type
/// Represents a formal or informal collective of Actors.
///
/// This is just an alias for `Object<GroupType>` because there's no fields inherent to
/// Group that aren't already present on an Object.
pub type Group = Object<GroupType>;
/// The ActivityStreams Organization type
/// Represents an organization.
///
/// This is just an alias for `Object<OrganizationType>` because there's no fields inherent to
/// Organization that aren't already present on an Object.
pub type Organization = Object<OrganizationType>;
/// The ActivityStreams Person type
/// Represents an individual person.
///
/// This is just an alias for `Object<PersonType>` because there's no fields inherent to
/// Person that aren't already present on an Object.
pub type Person = Object<PersonType>;
/// The ActivityStreams Service type
/// Represents a service of any kind.
///
/// This is just an alias for `Object<ServiceType>` because there's no fields inherent to
/// Service that aren't already present on an Object.

View file

@ -464,7 +464,7 @@ pub trait LinkExt<Kind>: AsLink<Kind> {
}
}
/// The ActivityStreams Mention type
/// A specialized Link that represents an @mention.
///
/// This is just an alias for `Link<MentionType>` because there's no fields inherent to Mention
/// that aren't already present on a Link.

View file

@ -4197,49 +4197,49 @@ pub trait TombstoneExt: AsTombstone {
}
}
/// The ActivityStreams Article type
/// Represents any kind of multi-paragraph written work.
///
/// This is just an alias for `Object<ArticleType>` because there's no fields inherent to Article
/// that aren't already present on an Object.
pub type Article = Object<ArticleType>;
/// The ActivityStreams Audio type
/// Represents an audio document of any kind.
///
/// This is just an alias for `Object<AudioType>` because there's no fields inherent to Audio
/// that aren't already present on an Object.
pub type Audio = Object<AudioType>;
/// The ActivityStreams Document type
/// Represents a document of any kind.
///
/// This is just an alias for `Object<DocumentType>` because there's no fields inherent to Document
/// that aren't already present on an Object.
pub type Document = Object<DocumentType>;
/// The ActivityStreams Event type
/// Represents any kind of event.
///
/// This is just an alias for `Object<EventType>` because there's no fields inherent to Event
/// that aren't already present on an Object.
pub type Event = Object<EventType>;
/// The ActivityStreams Image type
/// An image document of any kind.
///
/// This is just an alias for `Object<ImageType>` because there's no fields inherent to Image
/// that aren't already present on an Object.
pub type Image = Object<ImageType>;
/// The ActivityStreams Note type
/// Represents a short written work typically less than a single paragraph in length.
///
/// This is just an alias for `Object<NoteType>` because there's no fields inherent to Note
/// that aren't already present on an Object.
pub type Note = Object<NoteType>;
/// The ActivityStreams Page type
/// Represents a Web Page.
///
/// This is just an alias for `Object<PageType>` because there's no fields inherent to Page
/// that aren't already present on an Object.
pub type Page = Object<PageType>;
/// The ActivityStreams Video type
/// Represents a video document of any kind.
///
/// This is just an alias for `Object<VideoType>` because there's no fields inherent to Video
/// that aren't already present on an Object.
@ -4529,7 +4529,24 @@ pub struct ApObject<Inner> {
pub inner: Inner,
}
/// Define all the properties of the Location type as described by the Activity Streams vocabulary.
/// Represents a logical or physical location.
///
/// The Place object is used to represent both physical and logical locations. While numerous
/// existing vocabularies exist for describing locations in a variety of ways, inconsistencies and
/// incompatibilities between those vocabularies make it difficult to achieve appropriate
/// interoperability between implementations. The Place object is included within the Activity
/// vocabulary to provide a minimal, interoperable starting point for describing locations
/// consistently across Activity Streams 2.0 implementations.
///
/// The Place object is intentionally flexible. It can, for instance, be used to identify a
/// location simply by name, or by longitude and latitude.
///
/// The Place object can also describe an area around a given point using the radius property, the
/// altitude of the location, and a degree of accuracy.
///
/// While publishers are not required to use these specific properties and MAY make use of other
/// mechanisms for describing locations, consuming implementations that support the Place object
/// MUST support the use of these properties.
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, TypedBuilder)]
#[builder(doc)]
pub struct Place {
@ -4596,8 +4613,10 @@ pub struct Place {
pub inner: Object<PlaceType>,
}
/// The object being extendedDefine all the properties of the Profile type as described by the
/// Activity Streams vocabulary.
/// A Profile is a content object that describes another Object, typically used to describe Actor
/// Type objects.
///
/// The describes property is used to reference the object being described by the profile.
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, TypedBuilder)]
#[builder(doc)]
pub struct Profile {
@ -4614,8 +4633,20 @@ pub struct Profile {
pub inner: Object<ProfileType>,
}
/// Define all the properties of the Relationship type as described by the Activity Streams
/// vocabulary.
/// Describes a relationship between two individuals.
///
/// The subject and object properties are used to identify the connected individuals.
///
/// The Relationship object is used to represent relationships between individuals. It can be used,
/// for instance, to describe that one person is a friend of another, or that one person is a
/// member of a particular organization. The intent of modeling Relationship in this way is to
/// allow descriptions of activities that operate on the relationships in general, and to allow
/// representation of Collections of relationships.
///
/// For instance, many social systems have a notion of a "friends list". These are the collection
/// of individuals that are directly connected within a person's social graph. Suppose we have a
/// user, Sally, with direct relationships to users Joe and Jane. Sally follows Joe's updates while
/// Sally and Jane have a mutual relationship.
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, TypedBuilder)]
#[builder(doc)]
pub struct Relationship {
@ -4652,8 +4683,10 @@ pub struct Relationship {
pub inner: Object<RelationshipType>,
}
/// Define all the properties of the Tombstone type as described by the Activity Streams
/// vocabulary.
/// A Tombstone represents a content object that has been deleted.
///
/// It can be used in Collections to signify that there used to be an object at this position, but
/// it has been deleted.
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, TypedBuilder)]
#[builder(doc)]
pub struct Tombstone {