pub struct ActivityProperties {
pub result: Option<Value>,
pub instrument: Option<Value>,
}Expand description
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
Implementations§
Source§impl ActivityProperties
impl ActivityProperties
Sourcepub fn result_object<T: Object>(&self) -> Result<T>
pub fn result_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
Sourcepub fn set_result_object<T: Object>(&mut self, item: T) -> Result<()>
pub fn set_result_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
Sourcepub fn result_object_vec<T: Object>(&self) -> Result<Vec<T>>
pub fn result_object_vec<T: Object>(&self) -> Result<Vec<T>>
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
Sourcepub fn set_result_object_vec<T: Object>(&mut self, item: Vec<T>) -> Result<()>
pub fn set_result_object_vec<T: Object>(&mut self, item: Vec<T>) -> Result<()>
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
Sourcepub fn result_link<T: Link>(&self) -> Result<T>
pub fn result_link<T: Link>(&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
Sourcepub fn set_result_link<T: Link>(&mut self, item: T) -> Result<()>
pub fn set_result_link<T: Link>(&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
Sourcepub fn result_link_vec<T: Link>(&self) -> Result<Vec<T>>
pub fn result_link_vec<T: Link>(&self) -> Result<Vec<T>>
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
Sourcepub fn set_result_link_vec<T: Link>(&mut self, item: Vec<T>) -> Result<()>
pub fn set_result_link_vec<T: Link>(&mut self, item: Vec<T>) -> Result<()>
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
Sourcepub fn result_string(&self) -> Result<String>
pub fn result_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
Sourcepub fn set_result_string(&mut self, item: String) -> Result<()>
pub fn set_result_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
Sourcepub fn result_string_vec(&self) -> Result<Vec<String>>
pub fn result_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
Sourcepub fn set_result_string_vec(&mut self, item: Vec<String>) -> Result<()>
pub fn set_result_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
Sourcepub fn instrument_object<T: Object>(&self) -> Result<T>
pub fn instrument_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
Sourcepub fn set_instrument_object<T: Object>(&mut self, item: T) -> Result<()>
pub fn set_instrument_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
Sourcepub fn instrument_object_vec<T: Object>(&self) -> Result<Vec<T>>
pub fn instrument_object_vec<T: Object>(&self) -> Result<Vec<T>>
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
Sourcepub fn set_instrument_object_vec<T: Object>(
&mut self,
item: Vec<T>,
) -> Result<()>
pub fn set_instrument_object_vec<T: Object>( &mut self, item: Vec<T>, ) -> Result<()>
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
Sourcepub fn instrument_link<T: Link>(&self) -> Result<T>
pub fn instrument_link<T: Link>(&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
Sourcepub fn set_instrument_link<T: Link>(&mut self, item: T) -> Result<()>
pub fn set_instrument_link<T: Link>(&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
Sourcepub fn instrument_link_vec<T: Link>(&self) -> Result<Vec<T>>
pub fn instrument_link_vec<T: Link>(&self) -> Result<Vec<T>>
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
Sourcepub fn set_instrument_link_vec<T: Link>(&mut self, item: Vec<T>) -> Result<()>
pub fn set_instrument_link_vec<T: Link>(&mut self, item: Vec<T>) -> Result<()>
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
Sourcepub fn instrument_string(&self) -> Result<String>
pub fn instrument_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
Sourcepub fn set_instrument_string(&mut self, item: String) -> Result<()>
pub fn set_instrument_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
Sourcepub fn instrument_string_vec(&self) -> Result<Vec<String>>
pub fn instrument_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
Trait Implementations§
Source§impl Clone for ActivityProperties
impl Clone for ActivityProperties
Source§fn clone(&self) -> ActivityProperties
fn clone(&self) -> ActivityProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more