Skip to main content

ReleaseSurface

Struct ReleaseSurface 

Source
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>

Source

pub fn new( sources: &[SurfaceSource<'s>], roots: &[ApplicationName], untracked: &'s BTreeSet<DependencyName>, ) -> Self

Source

pub fn module(&self, name: &ModuleName) -> Option<&ModuleEntry<'s>>

Source

pub fn header(&self, reference: &HeaderRef) -> Option<&'s HrlFile>

Source

pub fn shipped(&self) -> &ShippedApps

Source

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.

Source

pub fn find_record( &self, roots: &BTreeSet<HeaderRef>, name: &RecordName, ) -> Option<(HeaderRef, &'s RecordDecl)>

Source

pub fn find_macro( &self, roots: &BTreeSet<HeaderRef>, key: &MacroKey, ) -> Option<(HeaderRef, &'s MacroDecl)>

Source

pub fn has_any_header(&self, roots: &BTreeSet<HeaderRef>) -> bool

Whether any root header exists in the release.

Source

pub fn untracked_dependency(&self, app: &ApplicationName) -> bool

Source

pub fn tree_apps(&self) -> &BTreeSet<&'s ApplicationName>

Every app the release’s snapshots carry a manifest for, shipped or not.

Source

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.

Source

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.

Source

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§

Source§

impl<'s> Debug for ReleaseSurface<'s>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more