Trait write_only::WriteAt[][src]

pub trait WriteAt<T> {
    fn write_at(&mut self, index: usize, value: T);
unsafe fn write_at_unchecked(&mut self, index: usize, value: T); }
Expand description

A trait for objects which provide non-dropping indexed write access to their values.

Required methods

Performs a write of a memory location with the given value without reading or dropping the old value.

Panics

Panics if index is out of bounds.

Performs a write of a memory location with the given value without reading or dropping the old value.

For a safe alternative see WriteAt::write_at.

Safety

Calling this method with an out-of-bounds index is undefined behavior.

Implementors