[][src]Struct rna::MeguScript

pub struct MeguScript { /* fields omitted */ }

MeguScript is a data structure for loot table script

Methods

impl MeguScript[src]

pub fn from_path(
    path: impl Into<PathBuf>,
    base_path: impl Into<PathBuf>
) -> Result<MeguScript, ReadError>
[src]

Create new MeguScript from path

Errors

This method can fail when:

  • ScriptFormat emit error (i.e. Invalid Syntax)
  • I/O emit error (i.e. Cannot read file from path)
  • Serde emit Error (i.e. JSON Error)

Example

let script = MeguScript::from_path("path/to/loot_table.ult", "resource").unwrap();

pub fn merge(&self, other: &mut MeguScript)[src]

Merge this script to other script. This method will mutate other but not self.

pub fn compile(
    &self,
    base_path: impl Into<PathBuf>
) -> Result<MeguScript, ReadError>
[src]

Compile Extension inside extend (if not None).

pub fn remove_drops(&mut self) -> Vec<Option<MeguDrop>>[src]

Search through pools field and remove any Drop that's listed inside remove field.

Trait Implementations

impl Clone for MeguScript[src]

impl Debug for MeguScript[src]

impl Default for MeguScript[src]

impl From<PathBuf> for MeguScript[src]

impl From<ScriptFormat> for MeguScript[src]

impl PartialEq<MeguScript> for MeguScript[src]

impl StructuralPartialEq for MeguScript[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.