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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.