pub struct ParametersBuilder { /* private fields */ }
Expand description
Helper to build a parameters hash.
A collection of parameters are like the type parameters like String
and
i64
in a signature like:
::my_crate::Map<String, i64>
§Examples
use rune::TypeHash;
use rune::hash::ParametersBuilder;
let mut params = ParametersBuilder::new();
let params = params.add(String::HASH)?;
let params = params.add(i64::HASH)?;
let hash = params.finish();
Implementations§
Source§impl ParametersBuilder
impl ParametersBuilder
Sourcepub const fn new() -> ParametersBuilder
pub const fn new() -> ParametersBuilder
Construct a new collection of parameters.
Sourcepub const fn add(self, _: Hash) -> Result<ParametersBuilder, TooManyParameters>
pub const fn add(self, _: Hash) -> Result<ParametersBuilder, TooManyParameters>
Trait Implementations§
Source§impl Default for ParametersBuilder
impl Default for ParametersBuilder
Source§fn default() -> ParametersBuilder
fn default() -> ParametersBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParametersBuilder
impl RefUnwindSafe for ParametersBuilder
impl Send for ParametersBuilder
impl Sync for ParametersBuilder
impl Unpin for ParametersBuilder
impl UnwindSafe for ParametersBuilder
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