pub struct Paramdex { /* private fields */ }
Expand description
A simple mapping from param type to a ParamDef
Implementations§
Source§impl Paramdex
impl Paramdex
Sourcepub fn insert(&mut self, paramdef: ParamDef) -> Option<ParamDef>
pub fn insert(&mut self, paramdef: ParamDef) -> Option<ParamDef>
Insert a new ParamDef into the Paramdex
Sourcepub fn get_param_def(&self, key: &str) -> Option<&ParamDef>
pub fn get_param_def(&self, key: &str) -> Option<&ParamDef>
Retrieve a ParamDef based on a param type (encoded into params)
The relevant definition must first be inserted into the paramdex by using Paramdex::insert
or by deserializing the Paramdex.
§See also
Sourcepub fn deserialize_all<I: IntoIterator<Item = S>, S: AsRef<str>>(
input_iter: I,
) -> Result<Paramdex, ParamdefDeserializeError>
pub fn deserialize_all<I: IntoIterator<Item = S>, S: AsRef<str>>( input_iter: I, ) -> Result<Paramdex, ParamdefDeserializeError>
Deserialize a whole Paramdex from an iterator of &str
Auto Trait Implementations§
impl Freeze for Paramdex
impl RefUnwindSafe for Paramdex
impl Send for Paramdex
impl Sync for Paramdex
impl Unpin for Paramdex
impl UnwindSafe for Paramdex
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