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§impl Debug for CustomOpData
impl Debug for CustomOpData
Auto Trait Implementations§
impl Freeze for CustomOpData
impl RefUnwindSafe for CustomOpData
impl Send for CustomOpData
impl Sync for CustomOpData
impl Unpin for CustomOpData
impl UnsafeUnpin 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