[−][src]Struct hltas::types::HLTAS
A HLTAS script.
Fields
properties: Properties<'a>
Properties before the frames section.
lines: Vec<Line<'a>>
Contents of the frames section.
Methods
impl<'a> HLTAS<'a>
[src]
pub fn from_str(input: &'a str) -> Result<Self, Error>
[src]
Parses a .hltas
script.
Examples
use std::fs::read_to_string; use hltas::HLTAS; let contents = read_to_string("script.hltas")?; match HLTAS::from_str(&contents) { Ok(hltas) => { /* ... */ } // The errors are pretty-printed with context. Err(error) => println!("{}", error), }
pub fn to_writer<W: Write>(&self, writer: W) -> Result<(), GenError>
[src]
Outputs the script in the .hltas
format.
Examples
use std::fs::File; use hltas::HLTAS; fn save_script(hltas: &HLTAS) -> Result<(), Box<dyn std::error::Error>> { let file = File::create("script.hltas")?; hltas.to_writer(file)?; Ok(()) }
Trait Implementations
impl<'a> Clone for HLTAS<'a>
[src]
impl<'a> Debug for HLTAS<'a>
[src]
impl<'a> Default for HLTAS<'a>
[src]
impl<'a> PartialEq<HLTAS<'a>> for HLTAS<'a>
[src]
impl<'a> StructuralPartialEq for HLTAS<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for HLTAS<'a>
impl<'a> Send for HLTAS<'a>
impl<'a> Sync for HLTAS<'a>
impl<'a> Unpin for HLTAS<'a>
impl<'a> UnwindSafe for HLTAS<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,