pub enum Token {
Show 14 variants UInt8(u8), UInt16(u16), UInt32(u32), Int8(i8), Int16(i16), Int32(i32), Float32(f32), Float64(f64), Char4(C4), Char256(C256), Str16(DynString<u16>), Str32(DynString<u32>), Union(PatchedMap), Vector(Vec<Token>),
}

Variants

UInt8(u8)

UInt16(u16)

UInt32(u32)

Int8(i8)

Int16(i16)

Int32(i32)

Float32(f32)

Float64(f64)

Char4(C4)

Char256(C256)

Str16(DynString<u16>)

Str32(DynString<u32>)

Union(PatchedMap)

Vector(Vec<Token>)

Implementations

Retrieve an immutable value by the given path. The return value will be a Token enum. using token.try_[type] function to get the actual data.

Examples
use aoe2_probe::Scenario;

let scenario = Scenario::from_file("./resources/chapter_1.aoe2scenario").unwrap();
//Immutable borrow author string.
let author = scenario.versio.get_by_path("/file_header/creator_name").try_str32();

Retrieve a mutable value by the given path. The return value will be a Token enum. using token.try_mut_[type] function to get the actual data.

Examples
use aoe2_probe::Scenario;

//Mutable borrow author string.
let mut scenario = Scenario::from_file("./resources/chapter_1.aoe2scenario").unwrap();
let author = scenario.versio.get_by_path_mut("/file_header/creator_name").try_mut_str32();
author.set_content("Arian");

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.