pub struct Package {
pub modules: Vec<Module>,
}Expand description
A package in the hugr AST.
See table::Package for the table representation.
Fields§
§modules: Vec<Module>The sequence of modules in the package.
Implementations§
Source§impl Package
impl Package
Sourcepub fn resolve<'a>(
&'a self,
bump: &'a Bump,
) -> Result<Package<'a>, ResolveError>
pub fn resolve<'a>( &'a self, bump: &'a Bump, ) -> Result<Package<'a>, ResolveError>
Try to convert this package into the table representation by
independently resolving its modules via Module::resolve.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnwindSafe for Package
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> 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