Struct PgsParser

Source
pub struct PgsParser<'a> { /* private fields */ }
Expand description

A parser for PGS files.

This struct is responsible for parsing PGS files into segments and creating display sets from those segments.

§Fields

  • sup_file_path: The path to the SUP file to be parsed.
  • segments: A vector storing the parsed PGS segments.
  • display_sets: A vector of display sets created from the parsed segments.

Implementations§

Source§

impl<'a> PgsParser<'a>

Source

pub fn get_display_sets(&self) -> &Vec<PgsDisplaySet>

Returns a reference to the vector of display sets.

§Returns

A reference to the Vec<PgsDisplaySet>.

Source

pub fn parse(sup_file_path: &'a str) -> Result<PgsParser<'a>>

Parses a PGS file and creates display sets.

§Arguments
  • sup_file_path - The path to the SUP file to be parsed.
§Returns

A Result containing either the PgsParser instance or an Error if the parsing fails.

Trait Implementations§

Source§

impl<'a> Debug for PgsParser<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for PgsParser<'a>

§

impl<'a> RefUnwindSafe for PgsParser<'a>

§

impl<'a> !Send for PgsParser<'a>

§

impl<'a> !Sync for PgsParser<'a>

§

impl<'a> Unpin for PgsParser<'a>

§

impl<'a> UnwindSafe for PgsParser<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.