pub struct SymGen(_);
Expand description

A programmatic representation of the resymgen YAML format.

At its core, a SymGen is just a mapping between block names and Blocks, along with convenient methods for manipulating the data within those Blocks.

Implementations

Merges other into self.

Merges other into self.

Returns a Vec<Symbol> containing symbols that were not successfully merged if no fatal error was encountered, or a MergeError if a fatal error was encountered.

Initializes all the block names and Blocks within the SymGen.

Reads an uninitialized SymGen from rdr.

Reads a SymGen from rdr. The returned SymGen will be initialized.

Reads a SymGen from rdr. The returned SymGen will be initialized and sorted.

Blocks and their contained Symbols are sorted by address. For version-dependent addresses, comparison is lexicographic in Version order.

Writes the SymGen data to writer in resymgen YAML format.

Integers will be written with the given int_format.

Writes the SymGen data to a String in resymgen YAML format.

Integers will be written with the given int_format.

Recursively resolves the contents of all Subregions in all Blocks within the SymGen.

Subregions are read from files using file_opener, with file paths based on the root directory specified by dir_path.

Moves all symbols within Subregions into their parent Blocks’ main symbol lists, destroying the Subregions in the process.

Expands the versions of all the addresses and lengths contained within the SymGen (in all the contained Blocks).

See Block::expand_versions().

Gets a reference to the OrdString key in the SymGen corresponding to block_name, if present.

Gets a reference to the Block associated with key, if present.

Gets a mutable reference to the Block associated with key, if present.

Inserts the Block contained by value into the SymGen, keyed by key.

If the SymGen already had a Block keyed by key, the old Block is returned.

Returns an Iterator over references to (block name, Block) pairs in the SymGen.

Returns an Iterator over mutable references to (block name, Block) pairs in the SymGen.

Returns an Iterator over references to Blocks in the SymGen.

Returns an Iterator over mutable references to Blocks in the SymGen.

Returns a flat Iterator over references to the Symbols contained within every Block in the SymGen.

Returns a flat Iterator over all symbols contained within every Block in the SymGen, realized for the Version corresponding to version_name.

Returns a flat Iterator over all function symbols contained within every Block in the SymGen, realized for the Version corresponding to version_name.

Returns a flat Iterator over all data symbols contained within every Block in the SymGen, realized for the Version corresponding to version_name.

Returns a SymGenCursor for this SymGen with the given file path.

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
Formats the value using the given formatter. Read more
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 !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
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
Compare self to key and return true if they are equal.

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
Converts the given value to a String. 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.