pub struct ValidatedSubnetCatalog { /* private fields */ }Expand description
ValidatedSubnetCatalog
Authority-bearing catalog whose raw content passed host validation.
Implementations§
Source§impl ValidatedSubnetCatalog
impl ValidatedSubnetCatalog
Sourcepub const fn raw(&self) -> &RawSubnetCatalog
pub const fn raw(&self) -> &RawSubnetCatalog
Return the immutable raw evidence that passed validation.
Sourcepub const fn provenance(&self) -> &SubnetCatalogProvenance
pub const fn provenance(&self) -> &SubnetCatalogProvenance
Return the validated provenance.
Sourcepub fn subnets(&self) -> &[SubnetInfo]
pub fn subnets(&self) -> &[SubnetInfo]
Return the validated canonical Subnet rows.
Sourcepub fn routing_ranges(&self) -> &[RoutingRange]
pub fn routing_ranges(&self) -> &[RoutingRange]
Return the validated canonical routing ranges.
Sourcepub const fn catalog_digest(&self) -> [u8; 32]
pub const fn catalog_digest(&self) -> [u8; 32]
Return the validated binary catalog digest.
Sourcepub fn to_raw(&self) -> RawSubnetCatalog
pub fn to_raw(&self) -> RawSubnetCatalog
Return a clone of the raw catalog for serialization or evidence storage.
Sourcepub fn into_raw(self) -> RawSubnetCatalog
pub fn into_raw(self) -> RawSubnetCatalog
Consume the validated wrapper and return its raw serialized evidence.
Sourcepub fn subnet_by_principal(&self, subnet_principal: &str) -> Option<&SubnetInfo>
pub fn subnet_by_principal(&self, subnet_principal: &str) -> Option<&SubnetInfo>
Find one validated Subnet row by canonical principal text.
Sourcepub fn routing_ranges_for_subnet(
&self,
subnet_principal: &str,
) -> Vec<&RoutingRange>
pub fn routing_ranges_for_subnet( &self, subnet_principal: &str, ) -> Vec<&RoutingRange>
Return the validated routing ranges assigned to one Subnet.
Source§impl ValidatedSubnetCatalog
impl ValidatedSubnetCatalog
Sourcepub fn resolve_canister_route(
&self,
input_principal: &str,
) -> Result<ResolvedCanisterRoute, CatalogError>
pub fn resolve_canister_route( &self, input_principal: &str, ) -> Result<ResolvedCanisterRoute, CatalogError>
Resolve one canister to authority evidence bound to this exact catalog.
Trait Implementations§
Source§impl Clone for ValidatedSubnetCatalog
impl Clone for ValidatedSubnetCatalog
Source§fn clone(&self) -> ValidatedSubnetCatalog
fn clone(&self) -> ValidatedSubnetCatalog
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidatedSubnetCatalog
impl Debug for ValidatedSubnetCatalog
impl Eq for ValidatedSubnetCatalog
Source§impl PartialEq for ValidatedSubnetCatalog
impl PartialEq for ValidatedSubnetCatalog
impl StructuralPartialEq for ValidatedSubnetCatalog
Auto Trait Implementations§
impl Freeze for ValidatedSubnetCatalog
impl RefUnwindSafe for ValidatedSubnetCatalog
impl Send for ValidatedSubnetCatalog
impl Sync for ValidatedSubnetCatalog
impl Unpin for ValidatedSubnetCatalog
impl UnsafeUnpin for ValidatedSubnetCatalog
impl UnwindSafe for ValidatedSubnetCatalog
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