qubit-value 0.6.0

Type-safe value container framework with unified abstractions for single values, multi-values, and named values with complete serde support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::value_error::ValueResult;

/// Internal trait used to set a single value in `MultiValues`.
///
/// This trait backs `MultiValues::set<S>()`; downstream code should call the
/// inherent method instead of implementing or naming this trait directly.
#[doc(hidden)]
pub trait MultiValuesSingleSetter<T> {
    /// Replaces the stored values with one `value`.
    ///
    /// # Returns
    ///
    /// Returns `Ok(())` when the value can be stored, or a `ValueError`
    /// describing why the update failed.
    fn set_single_value(&mut self, value: T) -> ValueResult<()>;
}