[][src]Struct rust_warrior::profile::Profile

pub struct Profile {
    pub name: String,
    pub directory: String,
    pub level: usize,
}

The player profile is the player's name and the current level. This is saved in .profile at the root of the player's project directory.

Fields

name: Stringdirectory: Stringlevel: usize

Methods

impl Profile[src]

pub fn new(name: String) -> Profile[src]

create new Profile for player with given name

pub fn from_toml(contents: &str) -> Profile[src]

load Profile from base64 encoded TOML String

pub fn to_toml(&self) -> String[src]

convert Profile to base64 encoded TOML String

Auto Trait Implementations

impl Sync for Profile

impl Unpin for Profile

impl Send for Profile

impl UnwindSafe for Profile

impl RefUnwindSafe for Profile

Blanket Implementations

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

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

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.

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

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

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