Struct activitystreams::activity::properties::ActivityProperties
[−]
[src]
pub struct ActivityProperties { pub result: Option<Value>, pub instrument: Option<Value>, }
Activity objects are specializations of the base Object type that provide information about actions that have either already occurred, are in the process of occurring, or may occur in the future.
Fields
result: Option<Value>
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.
- Range:
Object
|Link
- Funcitonal: false
instrument: Option<Value>
Identifies one or more objects used (or to be used) in the completion of an Activity
.
- Range:
Object
|Link
- Funcitonal: false
Methods
impl ActivityProperties
[src]
pub fn result_object<T>(&self) -> Result<T, Error> where
T: Object,
[src]
T: Object,
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_result_object<T>(&mut self, item: T) -> Result<(), Error> where
T: Object,
[src]
T: Object,
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 result_object_vec<T>(&self) -> Result<Vec<T>, Error> where
T: Object,
[src]
T: Object,
Retrieve many values 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_result_object_vec<T>(&mut self, item: Vec<T>) -> Result<(), Error> where
T: Object,
[src]
T: Object,
Set many values 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 result_link<T>(&self) -> Result<T, Error> where
T: Link,
[src]
T: Link,
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_result_link<T>(&mut self, item: T) -> Result<(), Error> where
T: Link,
[src]
T: Link,
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 result_link_vec<T>(&self) -> Result<Vec<T>, Error> where
T: Link,
[src]
T: Link,
Retrieve many values 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_result_link_vec<T>(&mut self, item: Vec<T>) -> Result<(), Error> where
T: Link,
[src]
T: Link,
Set many values 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 instrument_object<T>(&self) -> Result<T, Error> where
T: Object,
[src]
T: Object,
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_instrument_object<T>(&mut self, item: T) -> Result<(), Error> where
T: Object,
[src]
T: Object,
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 instrument_object_vec<T>(&self) -> Result<Vec<T>, Error> where
T: Object,
[src]
T: Object,
Retrieve many values 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_instrument_object_vec<T>(
&mut self,
item: Vec<T>
) -> Result<(), Error> where
T: Object,
[src]
&mut self,
item: Vec<T>
) -> Result<(), Error> where
T: Object,
Set many values 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 instrument_link<T>(&self) -> Result<T, Error> where
T: Link,
[src]
T: Link,
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_instrument_link<T>(&mut self, item: T) -> Result<(), Error> where
T: Link,
[src]
T: Link,
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 instrument_link_vec<T>(&self) -> Result<Vec<T>, Error> where
T: Link,
[src]
T: Link,
Retrieve many values 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_instrument_link_vec<T>(&mut self, item: Vec<T>) -> Result<(), Error> where
T: Link,
[src]
T: Link,
Set many values 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
Trait Implementations
impl<'de> Deserialize<'de> for ActivityProperties
[src]
fn deserialize<__D>(
__deserializer: __D
) -> Result<ActivityProperties, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<ActivityProperties, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Serialize for ActivityProperties
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Clone for ActivityProperties
[src]
fn clone(&self) -> ActivityProperties
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for ActivityProperties
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl Default for ActivityProperties
[src]
fn default() -> ActivityProperties
[src]
Returns the "default value" for a type. Read more