[−][src]Struct activitystreams::object::properties::ApObjectProperties
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<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
Implementations
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]
&mut self,
item: T
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error> where
T: TryInto<XsdAnyUri>,
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]
&mut self,
item: T
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error> where
T: TryInto<XsdAnyUri>,
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]
&mut self,
item: T
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error> where
T: TryInto<XsdAnyUri>,
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]
&mut self,
item: T
) -> Result<&mut Self, <T as TryInto<ObjectBox>>::Error> where
T: TryInto<ObjectBox>,
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]
&mut self,
item: T
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error> where
T: TryInto<XsdAnyUri>,
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 XsdAnyUri
s
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]
&mut self,
item: Vec<T>
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error> where
T: TryInto<XsdAnyUri>,
Set the upload_media
with a vector of types that can be converted into XsdAnyUri
s
pub fn add_upload_media<T>(
&mut self,
item: T
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error> where
T: TryInto<XsdAnyUri>,
[src]
&mut self,
item: T
) -> Result<&mut Self, <T as TryInto<XsdAnyUri>>::Error> where
T: TryInto<XsdAnyUri>,
Add a type that can be converted into a XsdAnyUri
to the upload_media
vec
Trait Implementations
impl Clone for ApObjectProperties
[src]
fn clone(&self) -> ApObjectProperties
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ApObjectProperties
[src]
impl Default for ApObjectProperties
[src]
fn default() -> ApObjectProperties
[src]
impl<'de> Deserialize<'de> for ApObjectProperties
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T> Extension<T> for ApObjectProperties where
T: Object,
[src]
T: Object,
impl Serialize for ApObjectProperties
[src]
Auto Trait Implementations
impl RefUnwindSafe for ApObjectProperties
impl Send for ApObjectProperties
impl Sync for ApObjectProperties
impl Unpin for ApObjectProperties
impl UnwindSafe for ApObjectProperties
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,