pub struct Gff {
pub file_type: FixedSizeString<4>,
pub file_version: FixedSizeString<4>,
pub root: Struct,
}Expand description
GFF file format. Mutable counterpart of bin_gff::Gff
Fields§
§file_type: FixedSizeString<4>GFF file type (BIC, UTC, …)
file_version: FixedSizeString<4>GFF file version
root: StructGFF root Struct, where everything is stored.
Implementations§
Source§impl Gff
impl Gff
Sourcepub fn from_bytes(input: &[u8]) -> NWNParseResult<'_, Self>
pub fn from_bytes(input: &[u8]) -> NWNParseResult<'_, Self>
Parse a GFF file from a byte array
Sourcepub fn from_bin_gff(bingff: &Gff) -> Result<Self, Box<dyn Error>>
pub fn from_bin_gff(bingff: &Gff) -> Result<Self, Box<dyn Error>>
Allocate a GFF tree from an existing read-only bin_gff::Gff
Sourcepub fn to_string_pretty(&self) -> String
pub fn to_string_pretty(&self) -> String
Serializes this GFF to human-readable text
Sourcepub fn to_bin_gff(&self) -> Gff
pub fn to_bin_gff(&self) -> Gff
Serializes this GFF into a read-only bin_gff::Gff
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Gff
impl<'de> Deserialize<'de> for Gff
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Gff
impl RefUnwindSafe for Gff
impl !Send for Gff
impl !Sync for Gff
impl Unpin for Gff
impl UnwindSafe for Gff
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more