Enum hltas::types::Line

source ·
pub enum Line {
    FrameBulk(FrameBulk),
    Save(String),
    SharedSeed(u32),
    Buttons(Buttons),
    LGAGSTMinSpeed(f32),
    Reset {
        non_shared_seed: i64,
    },
    Comment(String),
    VectorialStrafing(bool),
    VectorialStrafingConstraints(VectorialStrafingConstraints),
    Change(Change),
    TargetYawOverride(Vec<f32>),
    RenderYawOverride(Vec<f32>),
}
Expand description

A line in the frames section.

Variants§

§

FrameBulk(FrameBulk)

A frame bulk.

§

Save(String)

A save-load.

§

SharedSeed(u32)

A line that sets the shared seed to use next load.

§

Buttons(Buttons)

Sets or resets the strafing buttons.

§

LGAGSTMinSpeed(f32)

Minimum speed for the optimal leave-ground-action speed.

§

Reset

Fields

§non_shared_seed: i64

The non-shared seed to use for this reset.

An engine reset.

§

Comment(String)

A comment line.

§

VectorialStrafing(bool)

Enables or disables vectorial strafing.

§

VectorialStrafingConstraints(VectorialStrafingConstraints)

Sets the constraints for vectorial strafing.

§

Change(Change)

Starts smoothly changing a value.

§

TargetYawOverride(Vec<f32>)

Overrides yaw and target yaw for the subsequent frames.

§

RenderYawOverride(Vec<f32>)

Overrides render yaw for the subsequent frames.

Implementations§

source§

impl Line

source

pub fn frame_bulk(&self) -> Option<&FrameBulk>

Returns the &FrameBulk that the &Line contains.

Examples
use hltas::types::{FrameBulk, Line};

let frame_bulk = FrameBulk::with_frame_time("0.001".to_owned());
let frame_bulk_line = Line::FrameBulk(frame_bulk.clone());
assert_eq!(frame_bulk_line.frame_bulk(), Some(&frame_bulk));

let other_line = Line::SharedSeed(1);
assert_eq!(other_line.frame_bulk(), None);
source

pub fn frame_bulk_mut(&mut self) -> Option<&mut FrameBulk>

Returns the &mut FrameBulk that the &mut Line contains.

Examples
use hltas::types::{FrameBulk, Line};

let mut frame_bulk = FrameBulk::with_frame_time("0.001".to_owned());
let mut frame_bulk_line = Line::FrameBulk(frame_bulk.clone());
assert_eq!(frame_bulk_line.frame_bulk_mut(), Some(&mut frame_bulk));

let mut other_line = Line::SharedSeed(1);
assert_eq!(other_line.frame_bulk_mut(), None);

Trait Implementations§

source§

impl Clone for Line

source§

fn clone(&self) -> Line

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Line

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<Line> for Line

source§

fn eq(&self, other: &Line) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Line

Auto Trait Implementations§

§

impl RefUnwindSafe for Line

§

impl Send for Line

§

impl Sync for Line

§

impl Unpin for Line

§

impl UnwindSafe for Line

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.