Skip to main content

TryIndexUpdateOp

Trait TryIndexUpdateOp 

Source
pub trait TryIndexUpdateOp<Idx, Value> {
    // Required method
    fn try_index_update(
        &self,
        index: Idx,
        update: Value,
        mode: UpdateMode,
    ) -> Result<Array, IndexUpdateError>;
}
Expand description

Trait for functional indexed updates.

The source is unchanged. Slice bounds clip to the source shape, negative strides are supported, and empty slices are no-ops. Updates broadcast to the selection and cast to the source dtype. Reduction modes combine duplicate advanced indices; replacement does not define which duplicate wins.

Required Methods§

Source

fn try_index_update( &self, index: Idx, update: Value, mode: UpdateMode, ) -> Result<Array, IndexUpdateError>

Return a new array with update applied at index according to mode.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Value> TryIndexUpdateOp<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, E: ArrayIndex<'e>, F: ArrayIndex<'f>, G: ArrayIndex<'g>, H: ArrayIndex<'h>, I: ArrayIndex<'i>, J: ArrayIndex<'j>, K: ArrayIndex<'k>, L: ArrayIndex<'l>, M: ArrayIndex<'m>, N: ArrayIndex<'n>, O: ArrayIndex<'o>, P: ArrayIndex<'p>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, Value> TryIndexUpdateOp<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, E: ArrayIndex<'e>, F: ArrayIndex<'f>, G: ArrayIndex<'g>, H: ArrayIndex<'h>, I: ArrayIndex<'i>, J: ArrayIndex<'j>, K: ArrayIndex<'k>, L: ArrayIndex<'l>, M: ArrayIndex<'m>, N: ArrayIndex<'n>, O: ArrayIndex<'o>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, A, B, C, D, E, F, G, H, I, J, K, L, M, N, Value> TryIndexUpdateOp<(A, B, C, D, E, F, G, H, I, J, K, L, M, N), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, E: ArrayIndex<'e>, F: ArrayIndex<'f>, G: ArrayIndex<'g>, H: ArrayIndex<'h>, I: ArrayIndex<'i>, J: ArrayIndex<'j>, K: ArrayIndex<'k>, L: ArrayIndex<'l>, M: ArrayIndex<'m>, N: ArrayIndex<'n>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, A, B, C, D, E, F, G, H, I, J, K, L, M, Value> TryIndexUpdateOp<(A, B, C, D, E, F, G, H, I, J, K, L, M), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, E: ArrayIndex<'e>, F: ArrayIndex<'f>, G: ArrayIndex<'g>, H: ArrayIndex<'h>, I: ArrayIndex<'i>, J: ArrayIndex<'j>, K: ArrayIndex<'k>, L: ArrayIndex<'l>, M: ArrayIndex<'m>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, A, B, C, D, E, F, G, H, I, J, K, L, Value> TryIndexUpdateOp<(A, B, C, D, E, F, G, H, I, J, K, L), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, E: ArrayIndex<'e>, F: ArrayIndex<'f>, G: ArrayIndex<'g>, H: ArrayIndex<'h>, I: ArrayIndex<'i>, J: ArrayIndex<'j>, K: ArrayIndex<'k>, L: ArrayIndex<'l>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, A, B, C, D, E, F, G, H, I, J, K, Value> TryIndexUpdateOp<(A, B, C, D, E, F, G, H, I, J, K), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, E: ArrayIndex<'e>, F: ArrayIndex<'f>, G: ArrayIndex<'g>, H: ArrayIndex<'h>, I: ArrayIndex<'i>, J: ArrayIndex<'j>, K: ArrayIndex<'k>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, A, B, C, D, E, F, G, H, I, J, Value> TryIndexUpdateOp<(A, B, C, D, E, F, G, H, I, J), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, E: ArrayIndex<'e>, F: ArrayIndex<'f>, G: ArrayIndex<'g>, H: ArrayIndex<'h>, I: ArrayIndex<'i>, J: ArrayIndex<'j>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, A, B, C, D, E, F, G, H, I, Value> TryIndexUpdateOp<(A, B, C, D, E, F, G, H, I), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, E: ArrayIndex<'e>, F: ArrayIndex<'f>, G: ArrayIndex<'g>, H: ArrayIndex<'h>, I: ArrayIndex<'i>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, A, B, C, D, E, F, G, H, Value> TryIndexUpdateOp<(A, B, C, D, E, F, G, H), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, E: ArrayIndex<'e>, F: ArrayIndex<'f>, G: ArrayIndex<'g>, H: ArrayIndex<'h>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, A, B, C, D, E, F, G, Value> TryIndexUpdateOp<(A, B, C, D, E, F, G), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, E: ArrayIndex<'e>, F: ArrayIndex<'f>, G: ArrayIndex<'g>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, 'd, 'e, 'f, A, B, C, D, E, F, Value> TryIndexUpdateOp<(A, B, C, D, E, F), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, E: ArrayIndex<'e>, F: ArrayIndex<'f>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, 'd, 'e, A, B, C, D, E, Value> TryIndexUpdateOp<(A, B, C, D, E), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, E: ArrayIndex<'e>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, 'd, A, B, C, D, Value> TryIndexUpdateOp<(A, B, C, D), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, D: ArrayIndex<'d>, Value: AsRef<Array>,

Source§

impl<'a, 'b, 'c, A, B, C, Value> TryIndexUpdateOp<(A, B, C), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, C: ArrayIndex<'c>, Value: AsRef<Array>,

Source§

impl<'a, 'b, A, B, Value> TryIndexUpdateOp<(A, B), Value> for Array
where A: ArrayIndex<'a>, B: ArrayIndex<'b>, Value: AsRef<Array>,

Source§

impl<'a, A, Value> TryIndexUpdateOp<(A,), Value> for Array
where A: ArrayIndex<'a>, Value: AsRef<Array>,

Source§

impl<'a, Index, Value> TryIndexUpdateOp<Index, Value> for Array
where Index: ArrayIndex<'a>, Value: AsRef<Array>,

Source§

impl<'a, Value> TryIndexUpdateOp<&'a [ArrayIndexOp<'a>], Value> for Array
where Value: AsRef<Array>,