Function hltas::write::gen_strafe
source · pub fn gen_strafe<W: Write>(w: W, value: StrafeSettings) -> Result<(), GenError>
Expand description
Prints StrafeSettings
into writer.
Examples
use hltas::types::{StrafeDir, StrafeSettings, StrafeType};
let settings = StrafeSettings {
type_: StrafeType::MaxAngle,
dir: StrafeDir::Left,
};
let mut buf = Vec::new();
hltas::write::gen_strafe(&mut buf, settings).unwrap();
assert_eq!(buf, b"s10");