pub struct ImportMap {
pub aliases: HashMap<AliasName, TreeName>,
pub trees: HashMap<TreeName, FileName>,
pub files: HashSet<FileName>,
}Expand description
reordering by tree definition
Fields§
§aliases: HashMap<AliasName, TreeName>§trees: HashMap<TreeName, FileName>§files: HashSet<FileName>Implementations§
Source§impl ImportMap
impl ImportMap
Sourcepub fn build(file: &File) -> Result<Self, TreeError>
pub fn build(file: &File) -> Result<Self, TreeError>
processes the imports checking there is no crossing between aliases and definitions
§Note
For now, when the import of the whole file there is no validations on crossings and other things. Thus, better off to perform imports only for the used definitions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImportMap
impl RefUnwindSafe for ImportMap
impl Send for ImportMap
impl Sync for ImportMap
impl Unpin for ImportMap
impl UnwindSafe for ImportMap
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more