pub struct ForeignManifest {
pub program_id: Address,
pub expected_disc: u8,
pub expected_wire_fp: u64,
pub supported_epochs: RangeInclusive<u32>,
}Expand description
Opaque witness to a foreign program’s layout ABI.
Callers construct this once per foreign program they want to read
from, typically as a const from build-time-embedded metadata or
from the foreign program’s Hopper manifest account.
Fields§
§program_id: AddressOwner program that authored the layout. The account’s owner must match this address exactly.
expected_disc: u8Discriminator byte the foreign layout expects.
expected_wire_fp: u64Canonical wire-fingerprint hash from the foreign program’s
schema manifest. Matches AccountLayout::WIRE_FINGERPRINT on
the reader side.
supported_epochs: RangeInclusive<u32>Inclusive range of schema_epoch values the reader supports.
Accounts outside this range fail verification. the caller can
then fall back to a migration path or a different manifest.
Implementations§
Source§impl ForeignManifest
impl ForeignManifest
Sourcepub const fn single_epoch(
program_id: Address,
expected_disc: u8,
expected_wire_fp: u64,
epoch: u32,
) -> ForeignManifest
pub const fn single_epoch( program_id: Address, expected_disc: u8, expected_wire_fp: u64, epoch: u32, ) -> ForeignManifest
Build a single-epoch manifest covering expected_wire_fp for
program_id at exactly the given schema epoch.
Trait Implementations§
Source§impl Clone for ForeignManifest
impl Clone for ForeignManifest
Source§fn clone(&self) -> ForeignManifest
fn clone(&self) -> ForeignManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ForeignManifest
impl Debug for ForeignManifest
Source§impl PartialEq for ForeignManifest
impl PartialEq for ForeignManifest
Source§fn eq(&self, other: &ForeignManifest) -> bool
fn eq(&self, other: &ForeignManifest) -> bool
self and other values to be equal, and is used by ==.