pub trait DictTrait: DictTraitConst {
// Required method
fn as_raw_mut_Dict(&mut self) -> *mut c_void;
// Provided methods
unsafe fn ptr_mut(&mut self, key: &str) -> Result<DictValue> { ... }
fn set_str(&mut self, key: &str, value: &str) -> Result<String> { ... }
fn set(
&mut self,
key: &str,
value: &impl DictValueTraitConst
) -> Result<DictValue> { ... }
fn set_f64(&mut self, key: &str, value: &f64) -> Result<f64> { ... }
fn set_i64(&mut self, key: &str, value: &i64) -> Result<i64> { ... }
fn erase(&mut self, key: &str) -> Result<()> { ... }
}
Expand description
Mutable methods for crate::dnn::Dict
Required Methods§
fn as_raw_mut_Dict(&mut self) -> *mut c_void
Provided Methods§
sourceunsafe fn ptr_mut(&mut self, key: &str) -> Result<DictValue>
unsafe fn ptr_mut(&mut self, key: &str) -> Result<DictValue>
If the @p key in the dictionary then returns pointer to its value, else returns NULL.
sourcefn set_str(&mut self, key: &str, value: &str) -> Result<String>
fn set_str(&mut self, key: &str, value: &str) -> Result<String>
Sets new @p value for the @p key, or adds new key-value pair into the dictionary.
sourcefn set(
&mut self,
key: &str,
value: &impl DictValueTraitConst
) -> Result<DictValue>
fn set( &mut self, key: &str, value: &impl DictValueTraitConst ) -> Result<DictValue>
Sets new @p value for the @p key, or adds new key-value pair into the dictionary.
sourcefn set_f64(&mut self, key: &str, value: &f64) -> Result<f64>
fn set_f64(&mut self, key: &str, value: &f64) -> Result<f64>
Sets new @p value for the @p key, or adds new key-value pair into the dictionary.
Object Safety§
This trait is not object safe.