pub struct ReleaseSurface<'s> { /* private fields */ }Expand description
One host release as the analysis reads it: the host snapshot and its pinned dependency snapshots, indexed.
Implementations§
Source§impl<'s> ReleaseSurface<'s>
impl<'s> ReleaseSurface<'s>
pub fn new( sources: &[SurfaceSource<'s>], roots: &[ApplicationName], untracked: &'s BTreeSet<DependencyName>, ) -> Self
pub fn module(&self, name: &ModuleName) -> Option<&ModuleEntry<'s>>
pub fn header(&self, reference: &HeaderRef) -> Option<&'s HrlFile>
pub fn shipped(&self) -> &ShippedApps
Sourcepub fn header_closure(
&self,
roots: &BTreeSet<HeaderRef>,
) -> Vec<(HeaderRef, &'s HrlFile)>
pub fn header_closure( &self, roots: &BTreeSet<HeaderRef>, ) -> Vec<(HeaderRef, &'s HrlFile)>
The headers reachable from roots through their -include lines,
roots first. A header the release lacks ends its branch.
pub fn find_record( &self, roots: &BTreeSet<HeaderRef>, name: &RecordName, ) -> Option<(HeaderRef, &'s RecordDecl)>
pub fn find_macro( &self, roots: &BTreeSet<HeaderRef>, key: &MacroKey, ) -> Option<(HeaderRef, &'s MacroDecl)>
Sourcepub fn has_any_header(&self, roots: &BTreeSet<HeaderRef>) -> bool
pub fn has_any_header(&self, roots: &BTreeSet<HeaderRef>) -> bool
Whether any root header exists in the release.
pub fn untracked_dependency(&self, app: &ApplicationName) -> bool
Sourcepub fn tree_apps(&self) -> &BTreeSet<&'s ApplicationName>
pub fn tree_apps(&self) -> &BTreeSet<&'s ApplicationName>
Every app the release’s snapshots carry a manifest for, shipped or not.
Sourcepub fn partial(&self, reference: &PartialRef) -> Lookup<&'s PartialFile>
pub fn partial(&self, reference: &PartialRef) -> Lookup<&'s PartialFile>
Cuttlefish loads only the schemas of the apps on the node, so a partial is found only in an app the release ships.
Sourcepub fn validator(&self, name: &ValidatorName) -> Lookup<&'s ApplicationName>
pub fn validator(&self, name: &ValidatorName) -> Lookup<&'s ApplicationName>
The shipped app that defines a validator. A closure that stopped short may have missed the app that does.
Sourcepub fn untracked_owner(&self, module: &ModuleName) -> Option<&'s DependencyName>
pub fn untracked_owner(&self, module: &ModuleName) -> Option<&'s DependencyName>
A module the host’s snapshots lack, owned by a dependency the plan does not track: the module is the dependency’s name, or starts with it and an underscore.
Trait Implementations§
Auto Trait Implementations§
impl<'s> Forget for ReleaseSurface<'s>
impl<'s> Freeze for ReleaseSurface<'s>
impl<'s> Move for ReleaseSurface<'s>
impl<'s> RefUnwindSafe for ReleaseSurface<'s>
impl<'s> Send for ReleaseSurface<'s>
impl<'s> Sync for ReleaseSurface<'s>
impl<'s> Unpin for ReleaseSurface<'s>
impl<'s> UnsafeUnpin for ReleaseSurface<'s>
impl<'s> UnwindSafe for ReleaseSurface<'s>
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