pub struct ParameterDeclaration {
pub name: OSString,
pub parameter_type: ParameterType,
pub value: OSString,
pub constraint_groups: Vec<ValueConstraintGroup>,
}Expand description
Individual parameter declaration
Fields§
§name: OSString§parameter_type: ParameterType§value: OSString§constraint_groups: Vec<ValueConstraintGroup>Implementations§
Source§impl ParameterDeclaration
impl ParameterDeclaration
Sourcepub fn new(name: String, parameter_type: ParameterType, value: String) -> Self
pub fn new(name: String, parameter_type: ParameterType, value: String) -> Self
Create a new parameter declaration with the given name, type, and value
Sourcepub fn with_constraints(
name: String,
parameter_type: ParameterType,
value: String,
constraints: Vec<ValueConstraintGroup>,
) -> Self
pub fn with_constraints( name: String, parameter_type: ParameterType, value: String, constraints: Vec<ValueConstraintGroup>, ) -> Self
Create a parameter declaration with constraints
Sourcepub fn add_constraint(&mut self, constraint: ValueConstraint)
pub fn add_constraint(&mut self, constraint: ValueConstraint)
Add a constraint to this parameter declaration
Sourcepub fn has_constraints(&self) -> bool
pub fn has_constraints(&self) -> bool
Check if the parameter has constraints
Trait Implementations§
Source§impl Clone for ParameterDeclaration
impl Clone for ParameterDeclaration
Source§fn clone(&self) -> ParameterDeclaration
fn clone(&self) -> ParameterDeclaration
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 ParameterDeclaration
impl Debug for ParameterDeclaration
Source§impl Default for ParameterDeclaration
impl Default for ParameterDeclaration
Source§impl<'de> Deserialize<'de> for ParameterDeclaration
impl<'de> Deserialize<'de> for ParameterDeclaration
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
Source§impl PartialEq for ParameterDeclaration
impl PartialEq for ParameterDeclaration
Source§fn eq(&self, other: &ParameterDeclaration) -> bool
fn eq(&self, other: &ParameterDeclaration) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ParameterDeclaration
impl Serialize for ParameterDeclaration
impl StructuralPartialEq for ParameterDeclaration
Auto Trait Implementations§
impl Freeze for ParameterDeclaration
impl RefUnwindSafe for ParameterDeclaration
impl Send for ParameterDeclaration
impl Sync for ParameterDeclaration
impl Unpin for ParameterDeclaration
impl UnsafeUnpin for ParameterDeclaration
impl UnwindSafe for ParameterDeclaration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more