Struct Library

Source
pub struct Library {
    name: String,
    all_processes: Vec<Process>,
}
Expand description

Top-level struct containing all information read from an entire Process Library

All fields are private, but are accessible with “get” functions, e.g. Library.get_name() returns a reference to the Library’s name (&String).

Fields§

§name: String

The name of the process library, e.g. “Process Library”

§all_processes: Vec<Process>

A vector of crate::read_ebml::Process structs, each containing all information about its associated EBML file.

Implementations§

Source§

impl Library

Since all fields are private, “get” and “set”/“add” functions safely read and write a Library struct

Source

pub fn new() -> Library

Instantiate a new Library struct, with empty name and Process vec

Source

pub fn get_name(&self) -> &String

Return the contents of the “name” field

Source

pub fn get_all_processes(&self) -> &Vec<Process>

Return the contents of the “all_processes” field

Source

pub fn set_name(&mut self, lib_name: &str)

Change the name of the “name” field

Source

pub fn add_process(&mut self, process: Process)

push a new crate::read_ebml::Process to the all_processes vector

Source

pub fn display(&self)

Write to stdout a multi-line visual of the contents of a Library. This is mostly for debugging, because the HTML itself is supposed to be the nice output of even more information.

Auto Trait Implementations§

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.