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

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

The player profile is essentially just the player's chosen name and the level they are currently working on completing. This is saved in .profile at the root of the player's generated project.

Fields

name: Stringlevel: usize

Implementations

impl Profile[src]

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

create new Profile for player with given name

pub fn increment_level(&mut self)[src]

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

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

Trait Implementations

impl<'de> Deserialize<'de> for Profile[src]

impl Serialize for Profile[src]

Auto Trait Implementations

impl RefUnwindSafe for Profile

impl Send for Profile

impl Sync for Profile

impl Unpin for Profile

impl UnwindSafe for Profile

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 

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

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

impl<T> Resource for T where
    T: Any + Send + Sync

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.