Struct activitypub::object::properties::ApObjectProperties [−][src]
pub struct ApObjectProperties { pub shares: Option<Value>, pub likes: Option<Value>, pub source: Option<Value>, pub upload_media: Option<Value>, }
Define activitypub properties for the Object type as described by the Activity Pub vocabulary.
Fields
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<Value>
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<Value>
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<Value>
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]
impl ApObjectProperties
Retrieve a value from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
Set a value in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
pub fn likes_string(&self) -> Result<String>
[src]
pub fn likes_string(&self) -> Result<String>
Retrieve a value from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
pub fn set_likes_string(&mut self, item: String) -> Result<()>
[src]
pub fn set_likes_string(&mut self, item: String) -> Result<()>
Set a value in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
pub fn source_object<T: Object>(&self) -> Result<T>
[src]
pub fn source_object<T: Object>(&self) -> Result<T>
Retrieve a value of type T from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
pub fn set_source_object<T: Object>(&mut self, item: T) -> Result<()>
[src]
pub fn set_source_object<T: Object>(&mut self, item: T) -> Result<()>
Set a value of type T in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
pub fn upload_media_string(&self) -> Result<String>
[src]
pub fn upload_media_string(&self) -> Result<String>
Retrieve a value from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
pub fn set_upload_media_string(&mut self, item: String) -> Result<()>
[src]
pub fn set_upload_media_string(&mut self, item: String) -> Result<()>
Set a value in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
pub fn upload_media_string_vec(&self) -> Result<Vec<String>>
[src]
pub fn upload_media_string_vec(&self) -> Result<Vec<String>>
Retrieve many values from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound
and
Error::Deserialize
pub fn set_upload_media_string_vec(&mut self, item: Vec<String>) -> Result<()>
[src]
pub fn set_upload_media_string_vec(&mut self, item: Vec<String>) -> Result<()>
Set many values in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Trait Implementations
impl Clone for ApObjectProperties
[src]
impl Clone for ApObjectProperties
fn clone(&self) -> ApObjectProperties
[src]
fn clone(&self) -> ApObjectProperties
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for ApObjectProperties
[src]
impl Debug for ApObjectProperties
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for ApObjectProperties
[src]
impl Default for ApObjectProperties
fn default() -> ApObjectProperties
[src]
fn default() -> ApObjectProperties
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for ApObjectProperties
impl Send for ApObjectProperties
impl Sync for ApObjectProperties
impl Sync for ApObjectProperties