pub trait TryIndexMutOp<Idx, Val> {
// Required method
fn try_index_mut_device(
&mut self,
i: Idx,
val: Val,
stream: impl AsRef<Stream>,
) -> Result<()>;
// Provided method
fn try_index_mut(&mut self, i: Idx, val: Val) -> Result<()> { ... }
}
Expand description
Trait for custom mutable indexing operations.
Required Methods§
Provided Methods§
Sourcefn try_index_mut(&mut self, i: Idx, val: Val) -> Result<()>
fn try_index_mut(&mut self, i: Idx, val: Val) -> Result<()>
Try to index the array with the given index and set the value.
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.