pub struct PortableView {
pub id: String,
pub name: String,
pub scope: PortableScope,
pub resolution: String,
pub plan: Table,
pub normalized_plan: Option<Table>,
pub extensions: Table,
pub diagnostics: Vec<PortableDiagnostic>,
pub extra: Table,
}Expand description
One saved view in the portable form (data-model §1).
plan is the [plan] table as written, so a consumer can rebuild the
stored definition byte for byte; normalized_plan is the same plan after
ViewPlan::from_toml/ViewPlan::to_toml, which is the one normalized plan
every surface consumes (C-007) and is None exactly when this build cannot
interpret the stored plan — in which case the refusal’s diagnostics are carried
in diagnostics and the plan table is still retained.
Fields§
§id: StringThe stable identity. Immutable across rename; never reused.
name: StringThe display label. Mutable — it is not the identity.
scope: PortableScopeThe explicit scope metadata.
resolution: StringThe scope’s derived resolution (resolved, missing, conflict).
plan: TableThe persisted [plan] table, verbatim.
normalized_plan: Option<Table>The normalized plan, when this build can interpret it.
extensions: TableRecord-level fields this build does not interpret, preserved verbatim.
diagnostics: Vec<PortableDiagnostic>Unknown-metadata, scope, namespace, and executable-content diagnostics.
extra: TableView keys a newer portable format adds, preserved verbatim.
Implementations§
Source§impl PortableView
impl PortableView
Sourcepub fn from_saved<P: ProjectDirectory + ?Sized>(
view: &SavedView,
projects: &P,
registry_diagnostics: &[ViewDiagnostic],
) -> Self
pub fn from_saved<P: ProjectDirectory + ?Sized>( view: &SavedView, projects: &P, registry_diagnostics: &[ViewDiagnostic], ) -> Self
Project one stored view, given the registry-level diagnostics the caller’s registry pass produced for it.
The registry’s own diagnostics are reused rather than recomputed, so the scope/unknown-field vocabulary has exactly one author; the keys this module classifies (a remote target name, an executable name) replace the generic “unknown field” notice for the same field instead of duplicating it.
Sourcepub fn normalized_plan(&self) -> Option<&Table>
pub fn normalized_plan(&self) -> Option<&Table>
The normalized plan, when this build can interpret it.
Sourcepub fn diagnostics(&self) -> &[PortableDiagnostic]
pub fn diagnostics(&self) -> &[PortableDiagnostic]
Every diagnostic about this view.
Trait Implementations§
Source§impl Clone for PortableView
impl Clone for PortableView
Source§impl Debug for PortableView
impl Debug for PortableView
Source§impl<'de> Deserialize<'de> for PortableView
impl<'de> Deserialize<'de> for PortableView
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>,
Source§impl PartialEq for PortableView
impl PartialEq for PortableView
Source§impl Serialize for PortableView
impl Serialize for PortableView
impl StructuralPartialEq for PortableView
Auto Trait Implementations§
impl Freeze for PortableView
impl RefUnwindSafe for PortableView
impl Send for PortableView
impl Sync for PortableView
impl Unpin for PortableView
impl UnsafeUnpin for PortableView
impl UnwindSafe for PortableView
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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