[][src]Struct activitystreams::object::properties::ApObjectProperties

pub struct ApObjectProperties {
    pub shares: Option<XsdAnyUri>,
    pub likes: Option<XsdAnyUri>,
    pub source: Option<ApObjectPropertiesSourceEnum>,
    pub upload_media: Option<ApObjectPropertiesUploadMediaEnum>,
}

Define activitypub properties for the Object type as described by the Activity Pub vocabulary.

Fields

shares: Option<XsdAnyUri>

This is a list of all Announce activities with this object as the object property, added as a side effect.

The shares collection MUST be either an OrderedCollection or a Collection and MAY be filtered on privileges of an authenticated user or as appropriate when no authentication is given.

  • Range: anyUri
  • Functional: true
likes: Option<XsdAnyUri>

This is a list of all Like activities with this object as the object property, added as a side effect.

The likes collection MUST be either an OrderedCollection or a Collection and MAY be filtered on privileges of an authenticated user or as appropriate when no authentication is given.

  • Range: anyUri
  • Functional: true
source: Option<ApObjectPropertiesSourceEnum>

The source property is intended to convey some sort of source from which the content markup was derived, as a form of provenance, or to support future editing by clients.

In general, clients do the conversion from source to content, not the other way around.

The value of source is itself an object which uses its own content and mediaType fields to supply source information.

  • Range: Object
  • Functional: true
upload_media: Option<ApObjectPropertiesUploadMediaEnum>

Servers MAY support uploading document types to be referenced in activites, such as images, video or other binary data, but the precise mechanism is out of scope for this version of ActivityPub.

The Social Web Community Group is refining the protocol in the ActivityPub Media Upload report.

  • Range: anyUri
  • Functional: false

Methods

impl ApObjectProperties[src]

pub fn get_shares(&self) -> Option<&XsdAnyUri>[src]

Get shares as a XsdAnyUri

This returns None if there is no value present

pub fn set_shares<T>(
    &mut self,
    item: T
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error> where
    T: TryInto<XsdAnyUri>, 
[src]

Set the shares with a type that can be converted into XsdAnyUri

pub fn get_likes(&self) -> Option<&XsdAnyUri>[src]

Get likes as a XsdAnyUri

This returns None if there is no value present

pub fn set_likes<T>(
    &mut self,
    item: T
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error> where
    T: TryInto<XsdAnyUri>, 
[src]

Set the likes with a type that can be converted into XsdAnyUri

pub fn get_source_xsd_any_uri(&self) -> Option<&XsdAnyUri>[src]

Get source as a XsdAnyUri

This returns None if

  • There is no value present
  • The requested type is not the stored type

pub fn set_source_xsd_any_uri<T>(
    &mut self,
    item: T
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error> where
    T: TryInto<XsdAnyUri>, 
[src]

Set source with a value that can be converted into XsdAnyUri

pub fn get_source_object_box(&self) -> Option<&ObjectBox>[src]

Get source as a ObjectBox

This returns None if

  • There is no value present
  • The requested type is not the stored type

pub fn set_source_object_box<T>(
    &mut self,
    item: T
) -> Result<&mut Self, <T as TryInto<ObjectBox>>::Error> where
    T: TryInto<ObjectBox>, 
[src]

Set source with a value that can be converted into ObjectBox

pub fn get_upload_media(&self) -> Option<&XsdAnyUri>[src]

Get upload_media as a XsdAnyUri

This returns None if

  • There is no value present
  • There is more than one value present

pub fn set_upload_media<T>(
    &mut self,
    item: T
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error> where
    T: TryInto<XsdAnyUri>, 
[src]

Set the upload_media with a type that can be converted into XsdAnyUri

pub fn get_many_upload_medias(&self) -> Option<&[XsdAnyUri]>[src]

Get upload_media as a slice of XsdAnyUris

This returns None if

  • There is no value present
  • There is only one value present

pub fn set_many_upload_medias<T>(
    &mut self,
    item: Vec<T>
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error> where
    T: TryInto<XsdAnyUri>, 
[src]

Set the upload_media with a vector of types that can be converted into XsdAnyUris

Trait Implementations

impl AsMut<ApObjectProperties> for Accept[src]

impl AsMut<ApObjectProperties> for Add[src]

impl AsMut<ApObjectProperties> for Follow[src]

impl AsMut<ApObjectProperties> for Ignore[src]

impl AsMut<ApObjectProperties> for Invite[src]

impl AsMut<ApObjectProperties> for Join[src]

impl AsMut<ApObjectProperties> for Leave[src]

impl AsMut<ApObjectProperties> for Like[src]

impl AsMut<ApObjectProperties> for Listen[src]

impl AsMut<ApObjectProperties> for Offer[src]

impl AsMut<ApObjectProperties> for Question[src]

impl AsMut<ApObjectProperties> for Read[src]

impl AsMut<ApObjectProperties> for AMove[src]

impl AsMut<ApObjectProperties> for Reject[src]

impl AsMut<ApObjectProperties> for Remove[src]

impl AsMut<ApObjectProperties> for TentativeAccept[src]

impl AsMut<ApObjectProperties> for TentativeReject[src]

impl AsMut<ApObjectProperties> for Travel[src]

impl AsMut<ApObjectProperties> for Undo[src]

impl AsMut<ApObjectProperties> for Update[src]

impl AsMut<ApObjectProperties> for View[src]

impl AsMut<ApObjectProperties> for Application[src]

impl AsMut<ApObjectProperties> for Group[src]

impl AsMut<ApObjectProperties> for Announce[src]

impl AsMut<ApObjectProperties> for Organization[src]

impl AsMut<ApObjectProperties> for Person[src]

impl AsMut<ApObjectProperties> for Service[src]

impl AsMut<ApObjectProperties> for UnorderedCollection[src]

impl AsMut<ApObjectProperties> for UnorderedCollectionPage[src]

impl AsMut<ApObjectProperties> for OrderedCollection[src]

impl AsMut<ApObjectProperties> for OrderedCollectionPage[src]

impl AsMut<ApObjectProperties> for Article[src]

impl AsMut<ApObjectProperties> for Audio[src]

impl AsMut<ApObjectProperties> for Document[src]

impl AsMut<ApObjectProperties> for Arrive[src]

impl AsMut<ApObjectProperties> for Event[src]

impl AsMut<ApObjectProperties> for Image[src]

impl AsMut<ApObjectProperties> for Note[src]

impl AsMut<ApObjectProperties> for Page[src]

impl AsMut<ApObjectProperties> for Place[src]

impl AsMut<ApObjectProperties> for Profile[src]

impl AsMut<ApObjectProperties> for Relationship[src]

impl AsMut<ApObjectProperties> for Tombstone[src]

impl AsMut<ApObjectProperties> for Video[src]

impl AsMut<ApObjectProperties> for Block[src]

impl AsMut<ApObjectProperties> for Create[src]

impl AsMut<ApObjectProperties> for Delete[src]

impl AsMut<ApObjectProperties> for Dislike[src]

impl AsMut<ApObjectProperties> for Flag[src]

impl AsRef<ApObjectProperties> for Accept[src]

impl AsRef<ApObjectProperties> for Add[src]

impl AsRef<ApObjectProperties> for Follow[src]

impl AsRef<ApObjectProperties> for Ignore[src]

impl AsRef<ApObjectProperties> for Invite[src]

impl AsRef<ApObjectProperties> for Join[src]

impl AsRef<ApObjectProperties> for Leave[src]

impl AsRef<ApObjectProperties> for Like[src]

impl AsRef<ApObjectProperties> for Listen[src]

impl AsRef<ApObjectProperties> for Offer[src]

impl AsRef<ApObjectProperties> for Question[src]

impl AsRef<ApObjectProperties> for Read[src]

impl AsRef<ApObjectProperties> for AMove[src]

impl AsRef<ApObjectProperties> for Reject[src]

impl AsRef<ApObjectProperties> for Remove[src]

impl AsRef<ApObjectProperties> for TentativeAccept[src]

impl AsRef<ApObjectProperties> for TentativeReject[src]

impl AsRef<ApObjectProperties> for Travel[src]

impl AsRef<ApObjectProperties> for Undo[src]

impl AsRef<ApObjectProperties> for Update[src]

impl AsRef<ApObjectProperties> for View[src]

impl AsRef<ApObjectProperties> for Application[src]

impl AsRef<ApObjectProperties> for Group[src]

impl AsRef<ApObjectProperties> for Announce[src]

impl AsRef<ApObjectProperties> for Organization[src]

impl AsRef<ApObjectProperties> for Person[src]

impl AsRef<ApObjectProperties> for Service[src]

impl AsRef<ApObjectProperties> for UnorderedCollection[src]

impl AsRef<ApObjectProperties> for UnorderedCollectionPage[src]

impl AsRef<ApObjectProperties> for OrderedCollection[src]

impl AsRef<ApObjectProperties> for OrderedCollectionPage[src]

impl AsRef<ApObjectProperties> for Article[src]

impl AsRef<ApObjectProperties> for Audio[src]

impl AsRef<ApObjectProperties> for Document[src]

impl AsRef<ApObjectProperties> for Arrive[src]

impl AsRef<ApObjectProperties> for Event[src]

impl AsRef<ApObjectProperties> for Image[src]

impl AsRef<ApObjectProperties> for Note[src]

impl AsRef<ApObjectProperties> for Page[src]

impl AsRef<ApObjectProperties> for Place[src]

impl AsRef<ApObjectProperties> for Profile[src]

impl AsRef<ApObjectProperties> for Relationship[src]

impl AsRef<ApObjectProperties> for Tombstone[src]

impl AsRef<ApObjectProperties> for Video[src]

impl AsRef<ApObjectProperties> for Block[src]

impl AsRef<ApObjectProperties> for Create[src]

impl AsRef<ApObjectProperties> for Delete[src]

impl AsRef<ApObjectProperties> for Dislike[src]

impl AsRef<ApObjectProperties> for Flag[src]

impl Clone for ApObjectProperties[src]

impl Debug for ApObjectProperties[src]

impl Default for ApObjectProperties[src]

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

impl Serialize for ApObjectProperties[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[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: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.