Struct activitystreams_types::activity::properties::QuestionProperties [−][src]
Properties for the Question activity
Fields
one_of: Option<Value>
Identifies an exclusive option for a Question.
Use of one_of implies that the Question can have only a single answer. To indicate that a
Question can have multiple answers, use any_of.
- Range:
Object|Link - Functional: false
any_of: Option<Value>
Identifies an inclusive option for a Question.
Use of any_of implies that the Question can have multiple answers. To indicate that a
Question can have only one answer, use one_of.
- Range:
Object|Link - Functional: false
Methods
impl QuestionProperties[src]
impl QuestionPropertiespub fn one_of_object<T: Object>(&self) -> Result<T>[src]
pub fn one_of_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_one_of_object<T: Object>(&mut self, item: T) -> Result<()>[src]
pub fn set_one_of_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 one_of_object_vec<T: Object>(&self) -> Result<Vec<T>>[src]
pub fn one_of_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
pub fn set_one_of_object_vec<T: Object>(&mut self, item: Vec<T>) -> Result<()>[src]
pub fn set_one_of_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
pub fn one_of_link<T: Link>(&self) -> Result<T>[src]
pub fn one_of_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
pub fn set_one_of_link<T: Link>(&mut self, item: T) -> Result<()>[src]
pub fn set_one_of_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
pub fn one_of_link_vec<T: Link>(&self) -> Result<Vec<T>>[src]
pub fn one_of_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
pub fn set_one_of_link_vec<T: Link>(&mut self, item: Vec<T>) -> Result<()>[src]
pub fn set_one_of_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
pub fn any_of_object<T: Object>(&self) -> Result<T>[src]
pub fn any_of_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_any_of_object<T: Object>(&mut self, item: T) -> Result<()>[src]
pub fn set_any_of_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 any_of_object_vec<T: Object>(&self) -> Result<Vec<T>>[src]
pub fn any_of_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
pub fn set_any_of_object_vec<T: Object>(&mut self, item: Vec<T>) -> Result<()>[src]
pub fn set_any_of_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
pub fn any_of_link<T: Link>(&self) -> Result<T>[src]
pub fn any_of_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
pub fn set_any_of_link<T: Link>(&mut self, item: T) -> Result<()>[src]
pub fn set_any_of_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
pub fn any_of_link_vec<T: Link>(&self) -> Result<Vec<T>>[src]
pub fn any_of_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
pub fn set_any_of_link_vec<T: Link>(&mut self, item: Vec<T>) -> Result<()>[src]
pub fn set_any_of_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
Trait Implementations
impl Clone for QuestionProperties[src]
impl Clone for QuestionPropertiesfn clone(&self) -> QuestionProperties[src]
fn clone(&self) -> QuestionPropertiesReturns 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 QuestionProperties[src]
impl Debug for QuestionPropertiesfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Default for QuestionProperties[src]
impl Default for QuestionPropertiesfn default() -> QuestionProperties[src]
fn default() -> QuestionPropertiesReturns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for QuestionProperties
impl Send for QuestionPropertiesimpl Sync for QuestionProperties
impl Sync for QuestionProperties