pub struct QuestionProperties {
pub one_of: Option<Value>,
pub any_of: Option<Value>,
}Expand description
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
Implementations§
Source§impl QuestionProperties
impl QuestionProperties
Sourcepub fn one_of_object<T: Object>(&self) -> Result<T>
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
Sourcepub fn set_one_of_object<T: Object>(&mut self, item: T) -> Result<()>
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
Sourcepub fn one_of_object_vec<T: Object>(&self) -> Result<Vec<T>>
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
Sourcepub fn set_one_of_object_vec<T: Object>(&mut self, item: Vec<T>) -> Result<()>
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
Sourcepub fn one_of_link<T: Link>(&self) -> Result<T>
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
Sourcepub fn set_one_of_link<T: Link>(&mut self, item: T) -> Result<()>
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
Sourcepub fn one_of_link_vec<T: Link>(&self) -> Result<Vec<T>>
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
Sourcepub fn set_one_of_link_vec<T: Link>(&mut self, item: Vec<T>) -> Result<()>
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
Sourcepub fn one_of_string(&self) -> Result<String>
pub fn one_of_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_one_of_string(&mut self, item: String) -> Result<()>
pub fn set_one_of_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 one_of_string_vec(&self) -> Result<Vec<String>>
pub fn one_of_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_one_of_string_vec(&mut self, item: Vec<String>) -> Result<()>
pub fn set_one_of_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 any_of_object<T: Object>(&self) -> Result<T>
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
Sourcepub fn set_any_of_object<T: Object>(&mut self, item: T) -> Result<()>
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
Sourcepub fn any_of_object_vec<T: Object>(&self) -> Result<Vec<T>>
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
Sourcepub fn set_any_of_object_vec<T: Object>(&mut self, item: Vec<T>) -> Result<()>
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
Sourcepub fn any_of_link<T: Link>(&self) -> Result<T>
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
Sourcepub fn set_any_of_link<T: Link>(&mut self, item: T) -> Result<()>
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
Sourcepub fn any_of_link_vec<T: Link>(&self) -> Result<Vec<T>>
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
Sourcepub fn set_any_of_link_vec<T: Link>(&mut self, item: Vec<T>) -> Result<()>
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
Sourcepub fn any_of_string(&self) -> Result<String>
pub fn any_of_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_any_of_string(&mut self, item: String) -> Result<()>
pub fn set_any_of_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 any_of_string_vec(&self) -> Result<Vec<String>>
pub fn any_of_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 QuestionProperties
impl Clone for QuestionProperties
Source§fn clone(&self) -> QuestionProperties
fn clone(&self) -> QuestionProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more