Enum insim_core::vehicle::Vehicle
source · #[non_exhaustive]pub enum Vehicle {
Show 22 variants
Xfg,
Xrg,
Fbm,
Xrt,
Rb4,
Fxo,
Lx4,
Lx6,
Mrt,
Uf1,
Rac,
Fz5,
Fox,
Xfr,
Ufr,
Fo8,
Fxr,
Xrr,
Fzr,
Bf1,
Mod(u32),
Unknown,
}
Expand description
Handles parsing a vehicle name according to the Insim v9 rules. See https://www.lfs.net/forum/thread/95662-New-InSim-packet-size-byte-and-mod-info
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Xfg
Xrg
Fbm
Xrt
Rb4
Fxo
Lx4
Lx6
Mrt
Uf1
Rac
Fz5
Fox
Xfr
Ufr
Fo8
Fxr
Xrr
Fzr
Bf1
Mod(u32)
Unknown
Unknown vehicle. Probably a private mod?
Implementations§
Trait Implementations§
source§impl BinRead for Vehicle
impl BinRead for Vehicle
source§fn read_options<R: Read + Seek>(
reader: &mut R,
endian: Endian,
args: Self::Args<'_>
) -> BinResult<Self>
fn read_options<R: Read + Seek>( reader: &mut R, endian: Endian, args: Self::Args<'_> ) -> BinResult<Self>
source§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments and assuming
big-endian byte order. Read moresource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments and assuming
little-endian byte order. Read moresource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
Read
T
from the reader assuming native-endian byte order. Read moresource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self
from the reader, assuming big-endian byte order, using the
given arguments. Read moresource§impl BinWrite for Vehicle
impl BinWrite for Vehicle
source§fn write_options<W: Write + Seek>(
&self,
writer: &mut W,
endian: Endian,
args: Self::Args<'_>
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, writer: &mut W, endian: Endian, args: Self::Args<'_> ) -> BinResult<()>
source§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self
to the writer assuming big-endian byte order. Read moresource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self
to the writer assuming little-endian byte order. Read moresource§impl PartialEq for Vehicle
impl PartialEq for Vehicle
impl Eq for Vehicle
impl StructuralPartialEq for Vehicle
Auto Trait Implementations§
impl RefUnwindSafe for Vehicle
impl Send for Vehicle
impl Sync for Vehicle
impl Unpin for Vehicle
impl UnwindSafe for Vehicle
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