pub struct Options(/* private fields */);Expand description
A bundle’s options, checked as a whole: a tree that has been read is one a form can be drawn from without looking at it twice.
Implementations§
Source§impl Options
impl Options
Sourcepub fn new(options: Vec<OptionDef>) -> Result<Self, String>
pub fn new(options: Vec<OptionDef>) -> Result<Self, String>
Refuses a tree that would mean two things or nothing: a variable or a feature named twice, a slider with no range, a select whose default is not among its choices.
pub fn is_empty(&self) -> bool
pub fn as_slice(&self) -> &[OptionDef]
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Options
impl<'de> Deserialize<'de> for Options
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
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Forget for Options
impl Freeze for Options
impl Move for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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