Skip to main content

Document

Struct Document 

Source
pub struct Document {
    pub save: SaveGame,
    /* private fields */
}

Fields§

§save: SaveGame

Implementations§

Source§

impl Document

Source

pub fn parse_with_layout<R: Read + Seek>(reader: R) -> Result<Self>

Source

pub fn layout(&self) -> &FileLayout

Source

pub fn supports_editing(&self) -> bool

Source

pub fn to_bytes_unmodified(&self) -> Result<Vec<u8>>

Source

pub fn to_bytes_modified(&self) -> Result<Vec<u8>>

Source

pub fn set_hp(&mut self, hp: i32) -> Result<()>

Source

pub fn set_base_stat(&mut self, stat_index: usize, value: i32) -> Result<()>

Source

pub fn set_age(&mut self, age: i32) -> Result<()>

Source

pub fn set_gender(&mut self, gender: Gender) -> Result<()>

Source

pub fn set_level(&mut self, level: i32) -> Result<()>

Source

pub fn set_experience(&mut self, experience: i32) -> Result<()>

Source

pub fn set_skill_points(&mut self, skill_points: i32) -> Result<()>

Source

pub fn set_reputation(&mut self, reputation: i32) -> Result<()>

Source

pub fn set_karma(&mut self, karma: i32) -> Result<()>

Source

pub fn set_trait(&mut self, slot: usize, trait_index: i32) -> Result<()>

Source

pub fn clear_trait(&mut self, slot: usize) -> Result<()>

Source

pub fn set_perk_rank(&mut self, perk_index: usize, rank: i32) -> Result<()>

Source

pub fn clear_perk(&mut self, perk_index: usize) -> Result<()>

Source

pub fn set_inventory_quantity(&mut self, pid: i32, quantity: i32) -> Result<()>

Source

pub fn add_inventory_item(&mut self, pid: i32, quantity: i32) -> Result<()>

Source

pub fn remove_inventory_item( &mut self, pid: i32, quantity: Option<i32>, ) -> Result<()>

Trait Implementations§

Source§

impl Debug for Document

Source§

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

Formats the value using the given formatter. Read more

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.