SubscriptWrite

protocol SubscriptWrite<I, T>

Defines value[index] = replacement through an exclusive receiver.

replacement is consumed into the collection. Bounds and copy-on-write behavior are supplied by the concrete conformance.

Methods

mut func subscript_write(at: I, consume value: T) -> Void

Consumes value into the slot selected by at using the conformance's bounds policy.

View Source
mut func subscript_write(at: I, consume value: T) -> Void