Struct visioncortex::Field
source · [−]pub struct Field<T> { /* private fields */ }
Expand description
Vec<T>
that represents a 2D field
Implementations
The base implementation of Field
Constructs a height
by width
field with data
.
Returns None
if the size of data
does not equal to height * width
.
Returns a mutable reference to an element.
Replaces an element with value
and returns the element.
Returns the xy-coordinates representation of an index in the field.
Returns the index of a xy-coordinates representation in the field.
Constructs a height
by width
field, with each slot filled with the default value of its element type.
Constructs a height
by width
field, with each slot filled with value
.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Field<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Field<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more