pub struct Vector2 {
pub x: f32,
pub y: f32,
}
Expand description
A 2d point, size, or direction
Fields§
§x: f32
§y: f32
Trait Implementations§
Source§impl BinRead for Vector2
impl BinRead for Vector2
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_options: &ReadOptions,
__binrw_generated_var_arguments: Self::Args,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_options: &ReadOptions, __binrw_generated_var_arguments: Self::Args, ) -> BinResult<Self>
Read
Self
from the reader using the given ReadOptions
and
arguments.Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments.Source§impl BinWrite for Vector2
impl BinWrite for Vector2
Source§type Args = ()
type Args = ()
The type of arguments needed to be supplied in order to write this type, usually a tuple. Read more
Source§fn write_options<W: Write + Seek>(
&self,
__binrw_generated_var_writer: &mut W,
__binrw_generated_var_options: &WriteOptions,
__binrw_generated_var_arguments: Self::Args,
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_options: &WriteOptions, __binrw_generated_var_arguments: Self::Args, ) -> BinResult<()>
Write the type to a writer, given the options on how to write it and the type-specific
arguments
Auto Trait Implementations§
impl Freeze for Vector2
impl RefUnwindSafe for Vector2
impl Send for Vector2
impl Sync for Vector2
impl Unpin for Vector2
impl UnwindSafe for Vector2
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more