#[non_exhaustive]pub struct OperationOption {
pub name: Option<String>,
pub kind: Option<OperationOptionKind>,
pub label: Option<String>,
pub description: Option<String>,
pub required: Option<bool>,
pub default: Option<Value>,
pub possible_values: Vec<Value>,
pub extra: BTreeMap<String, Value>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Option<String>§kind: Option<OperationOptionKind>§label: Option<String>§description: Option<String>§required: Option<bool>§default: Option<Value>§possible_values: Vec<Value>§extra: BTreeMap<String, Value>Implementations§
Source§impl OperationOption
impl OperationOption
pub fn name(&self) -> Option<&str>
pub fn kind(&self) -> Option<&OperationOptionKind>
pub fn is_required(&self) -> bool
pub fn possible_values(&self) -> &[Value]
pub fn validate_value(&self, value: &Value) -> OperationValidationResult
Trait Implementations§
Source§impl Clone for OperationOption
impl Clone for OperationOption
Source§fn clone(&self) -> OperationOption
fn clone(&self) -> OperationOption
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OperationOption
impl Debug for OperationOption
Source§impl<'de> Deserialize<'de> for OperationOption
impl<'de> Deserialize<'de> for OperationOption
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OperationOption
impl RefUnwindSafe for OperationOption
impl Send for OperationOption
impl Sync for OperationOption
impl Unpin for OperationOption
impl UnsafeUnpin for OperationOption
impl UnwindSafe for OperationOption
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more