pub struct CustomOpData {
pub string_data: HashMap<String, String>,
pub numeric_data: HashMap<String, f64>,
}Expand description
User-provided data for custom operations.
Fields§
§string_data: HashMap<String, String>String key-value pairs
numeric_data: HashMap<String, f64>Numeric key-value pairs
Implementations§
Source§impl CustomOpData
impl CustomOpData
Sourcepub fn with_string(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_string( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Set string data.
Sourcepub fn with_numeric(self, key: impl Into<String>, value: f64) -> Self
pub fn with_numeric(self, key: impl Into<String>, value: f64) -> Self
Set numeric data.
Sourcepub fn get_string(&self, key: &str) -> Option<&String>
pub fn get_string(&self, key: &str) -> Option<&String>
Get string data.
Sourcepub fn get_numeric(&self, key: &str) -> Option<f64>
pub fn get_numeric(&self, key: &str) -> Option<f64>
Get numeric data.
Trait Implementations§
Source§impl Clone for CustomOpData
impl Clone for CustomOpData
Source§fn clone(&self) -> CustomOpData
fn clone(&self) -> CustomOpData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CustomOpData
impl Debug for CustomOpData
Source§impl Default for CustomOpData
impl Default for CustomOpData
Source§fn default() -> CustomOpData
fn default() -> CustomOpData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CustomOpData
impl RefUnwindSafe for CustomOpData
impl Send for CustomOpData
impl Sync for CustomOpData
impl Unpin for CustomOpData
impl UnwindSafe for CustomOpData
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