pub struct MandatoryParameter<T: ParameterVariant> { /* private fields */ }
Expand description
A parameter that must have a value This struct has ownership of the declared parameter. Additional parameter declaration will fail while this struct exists and the parameter will be undeclared when it is dropped.
Implementations§
Source§impl<T: ParameterVariant> MandatoryParameter<T>
impl<T: ParameterVariant> MandatoryParameter<T>
Sourcepub fn set<U: Into<T>>(&self, value: U) -> Result<(), ParameterValueError>
pub fn set<U: Into<T>>(&self, value: U) -> Result<(), ParameterValueError>
Sets the parameter value.
Returns ParameterValueError::OutOfRange
if the value is out of the parameter’s range.
Trait Implementations§
Source§impl<T: ParameterVariant + Debug> Debug for MandatoryParameter<T>
impl<T: ParameterVariant + Debug> Debug for MandatoryParameter<T>
Source§impl<T: ParameterVariant> Drop for MandatoryParameter<T>
impl<T: ParameterVariant> Drop for MandatoryParameter<T>
Source§impl<'a, T: ParameterVariant + 'a> TryFrom<ParameterBuilder<'a, T>> for MandatoryParameter<T>
impl<'a, T: ParameterVariant + 'a> TryFrom<ParameterBuilder<'a, T>> for MandatoryParameter<T>
Source§type Error = DeclarationError
type Error = DeclarationError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl<T> Freeze for MandatoryParameter<T>
impl<T> RefUnwindSafe for MandatoryParameter<T>where
T: RefUnwindSafe,
impl<T> Send for MandatoryParameter<T>where
T: Send,
impl<T> Sync for MandatoryParameter<T>where
T: Sync,
impl<T> Unpin for MandatoryParameter<T>where
T: Unpin,
impl<T> UnwindSafe for MandatoryParameter<T>where
T: UnwindSafe,
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