pub struct Param<'a> {
pub name: &'a str,
pub ty: ParamType,
/* private fields */
}Expand description
Represents a single parsed parameter.
Fields§
§name: &'a strParameter name.
ty: ParamTypeParameter type.
Implementations§
Source§impl<'a> Param<'a>
impl<'a> Param<'a>
pub fn new(type_and_name: &'a str, value: &'a str) -> Result<Self>
pub fn items<T: FromStr>( &self, ) -> impl Iterator<Item = Result<T, <T as FromStr>::Err>> + 'a
pub fn rgb(&self) -> Result<[f32; 3]>
pub fn single<T: FromStr>(&self) -> Result<T, <T as FromStr>::Err>
pub fn vec<T: FromStr>(&self) -> Result<Vec<T>, <T as FromStr>::Err>
pub fn spectrum(&self) -> Result<Spectrum>
Trait Implementations§
impl<'a> StructuralPartialEq for Param<'a>
Auto Trait Implementations§
impl<'a> Freeze for Param<'a>
impl<'a> RefUnwindSafe for Param<'a>
impl<'a> Send for Param<'a>
impl<'a> Sync for Param<'a>
impl<'a> Unpin for Param<'a>
impl<'a> UnwindSafe for Param<'a>
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