Skip to main content

OperatingProfile

Struct OperatingProfile 

Source
pub struct OperatingProfile {
Show 14 fields pub financial_fields: [&'static str; 16], pub financial_count: u8, pub authority_surfaces: [&'static str; 16], pub authority_count: u8, pub append_only_segments: [&'static str; 8], pub append_only_count: u8, pub migration_sensitive: [&'static str; 8], pub migration_sensitive_count: u8, pub stability_grades: [(&'static str, LayoutStabilityGrade); 8], pub stability_count: u8, pub has_financial_ops: bool, pub has_cpi_ops: bool, pub has_migration_paths: bool, pub has_receipts: bool,
}
Expand description

A machine-readable summary of a program’s operational characteristics.

Generated from a ProgramManifest to give auditors, dashboards, explorers, and operator tools a meaningful map of how the program behaves.

Fields§

§financial_fields: [&'static str; 16]

Fields classified as financial (balance, supply, basis_points).

§financial_count: u8

Number of valid financial field entries.

§authority_surfaces: [&'static str; 16]

Fields classified as authority surfaces (authority, owner, delegate).

§authority_count: u8

Number of valid authority surface entries.

§append_only_segments: [&'static str; 8]

Segments that are append-only.

§append_only_count: u8

Number of valid append-only segment entries.

§migration_sensitive: [&'static str; 8]

Segments sensitive to migration.

§migration_sensitive_count: u8

Number of valid migration-sensitive entries.

§stability_grades: [(&'static str, LayoutStabilityGrade); 8]

Layout stability grades per layout.

§stability_count: u8

Number of valid stability grade entries.

§has_financial_ops: bool

Whether the program has any financial operations.

§has_cpi_ops: bool

Whether the program has any CPI-invoking instructions.

§has_migration_paths: bool

Whether the program has migration paths defined.

§has_receipts: bool

Whether the program emits receipts.

Implementations§

Source§

impl OperatingProfile

Source

pub fn from_manifest(manifest: &ProgramManifest) -> Self

Generate an operating profile from a program manifest.

Trait Implementations§

Source§

impl Display for OperatingProfile

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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, 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.