Trait binpool::Vector
[−]
[src]
pub trait Vector: Sized + Default { type Scalar: Scalar; fn dim() -> usize; fn get(&self, ind: usize) -> &Self::Scalar; fn set(&mut self, ind: usize, val: Self::Scalar); fn write_property<W: Write>(
&self,
property_id: u16,
w: &mut W
) -> Result<()> { ... } fn write_array<W: Write, A: Array<Item = Self>>(
property_id: u16,
arr: &A,
w: &mut W
) -> Result<()> { ... } fn read_property<R: Read>(
&mut self,
state: State<Bytes>,
ty: u16,
r: &mut R
) -> Result<()> { ... } fn read_array<R: Read, A: Array<Item = Self>>(
state: State<Bytes>,
ty: u16,
arr: &mut A,
r: &mut R
) -> Result<()> { ... } }
Implemented by vector types.
Associated Types
Required Methods
fn dim() -> usize
Returns the number of dimensions.
fn get(&self, ind: usize) -> &Self::Scalar
Gets value.
fn set(&mut self, ind: usize, val: Self::Scalar)
Sets value.
Provided Methods
fn write_property<W: Write>(&self, property_id: u16, w: &mut W) -> Result<()>
Writes property.
fn write_array<W: Write, A: Array<Item = Self>>(
property_id: u16,
arr: &A,
w: &mut W
) -> Result<()>
property_id: u16,
arr: &A,
w: &mut W
) -> Result<()>
Writes array.
fn read_property<R: Read>(
&mut self,
state: State<Bytes>,
ty: u16,
r: &mut R
) -> Result<()>
&mut self,
state: State<Bytes>,
ty: u16,
r: &mut R
) -> Result<()>
Reads property.
fn read_array<R: Read, A: Array<Item = Self>>(
state: State<Bytes>,
ty: u16,
arr: &mut A,
r: &mut R
) -> Result<()>
state: State<Bytes>,
ty: u16,
arr: &mut A,
r: &mut R
) -> Result<()>
Reads array.