Struct resymgen::data_formats::symgen_yml::SymGen
source · pub struct SymGen(/* private fields */);
Expand description
Implementations§
source§impl SymGen
impl SymGen
sourcepub fn merge_symgen(&mut self, other: &Self) -> Result<(), MergeError>
pub fn merge_symgen(&mut self, other: &Self) -> Result<(), MergeError>
Merges other
into self
.
sourcepub fn merge_symbols<I>(&mut self, other: I) -> Result<Vec<Symbol>, MergeError>
pub fn merge_symbols<I>(&mut self, other: I) -> Result<Vec<Symbol>, MergeError>
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.
source§impl SymGen
impl SymGen
sourcepub fn read_sorted<R: Read>(rdr: R) -> Result<SymGen>
pub fn read_sorted<R: Read>(rdr: R) -> Result<SymGen>
sourcepub fn write<W: Write>(&self, writer: W, int_format: IntFormat) -> Result<()>
pub fn write<W: Write>(&self, writer: W, int_format: IntFormat) -> Result<()>
Writes the SymGen
data to writer
in resymgen
YAML format.
Integers will be written with the given int_format
.
sourcepub fn write_to_str(&self, int_format: IntFormat) -> Result<String>
pub fn write_to_str(&self, int_format: IntFormat) -> Result<String>
sourcepub fn resolve_subregions<P, R, F>(
&mut self,
dir_path: P,
file_opener: F
) -> Result<()>
pub fn resolve_subregions<P, R, F>( &mut self, dir_path: P, file_opener: F ) -> Result<()>
sourcepub fn collapse_subregions(&mut self)
pub fn collapse_subregions(&mut self)
sourcepub fn expand_versions(&mut self)
pub fn expand_versions(&mut self)
sourcepub fn get(&self, key: &OrdString) -> Option<&Block>
pub fn get(&self, key: &OrdString) -> Option<&Block>
Gets a reference to the Block
associated with key
, if present.
sourcepub fn get_mut(&mut self, key: &OrdString) -> Option<&mut Block>
pub fn get_mut(&mut self, key: &OrdString) -> Option<&mut Block>
Gets a mutable reference to the Block
associated with key
, if present.
sourcepub fn blocks_mut(&mut self) -> impl Iterator<Item = &mut Block>
pub fn blocks_mut(&mut self) -> impl Iterator<Item = &mut Block>
sourcepub fn symbols_realized(
&self,
version_name: &str
) -> impl Iterator<Item = RealizedSymbol<'_>> + '_
pub fn symbols_realized( &self, version_name: &str ) -> impl Iterator<Item = RealizedSymbol<'_>> + '_
sourcepub fn functions_realized(
&self,
version_name: &str
) -> impl Iterator<Item = RealizedSymbol<'_>> + '_
pub fn functions_realized( &self, version_name: &str ) -> impl Iterator<Item = RealizedSymbol<'_>> + '_
sourcepub fn data_realized(
&self,
version_name: &str
) -> impl Iterator<Item = RealizedSymbol<'_>> + '_
pub fn data_realized( &self, version_name: &str ) -> impl Iterator<Item = RealizedSymbol<'_>> + '_
sourcepub fn cursor<'s, 'p>(&'s self, path: &'p Path) -> SymGenCursor<'s, 'p>
pub fn cursor<'s, 'p>(&'s self, path: &'p Path) -> SymGenCursor<'s, 'p>
Returns a SymGenCursor
for this SymGen
with the given file path.
Trait Implementations§
source§impl<'de> Deserialize<'de> for SymGen
impl<'de> Deserialize<'de> for SymGen
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
source§impl PartialEq for SymGen
impl PartialEq for SymGen
impl Eq for SymGen
impl StructuralEq for SymGen
impl StructuralPartialEq for SymGen
Auto Trait Implementations§
impl RefUnwindSafe for SymGen
impl Send for SymGen
impl Sync for SymGen
impl Unpin for SymGen
impl UnwindSafe for SymGen
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.