pub struct DistributedCoreManifest {
pub identity: CoreIdentity,
pub app_name: String,
pub app_version: String,
pub runtime_min_version: String,
pub runtime_max_version: Option<String>,
pub capabilities: Vec<CapabilityDescriptor>,
pub endpoints: Vec<PeerEndpoint>,
pub metadata: BTreeMap<String, String>,
}Expand description
Internal structured manifest used to assemble distributed peer state.
Public wire APIs expose the versioned PeerAdvertisementV1 contract.
Fields§
§identity: CoreIdentityDistributed Core identity.
app_name: StringHuman-readable application name.
app_version: StringApplication version.
runtime_min_version: StringMinimum compatible Runtime version.
runtime_max_version: Option<String>Optional maximum compatible Runtime version.
capabilities: Vec<CapabilityDescriptor>Generic capabilities exposed by the Core.
endpoints: Vec<PeerEndpoint>Public endpoints without credentials.
metadata: BTreeMap<String, String>Non-sensitive routing metadata.
Implementations§
Source§impl DistributedCoreManifest
impl DistributedCoreManifest
Sourcepub fn from_application_manifest(
manifest: &ApplicationManifestV1,
identity: CoreIdentity,
) -> Result<DistributedCoreManifest, RuntimeError>
pub fn from_application_manifest( manifest: &ApplicationManifestV1, identity: CoreIdentity, ) -> Result<DistributedCoreManifest, RuntimeError>
Derives distributed peer state from the application contract and Core identity.
Sourcepub fn identity(&self) -> &CoreIdentity
pub fn identity(&self) -> &CoreIdentity
Returns the distributed identity.
Sourcepub fn supports_capability(&self, capability: &CapabilityName) -> bool
pub fn supports_capability(&self, capability: &CapabilityName) -> bool
Reports whether the Core advertises capability.
Sourcepub fn capability_names(&self) -> Vec<CapabilityName>
pub fn capability_names(&self) -> Vec<CapabilityName>
Returns all advertised capability names.
Sourcepub fn check_peer_compatibility(
&self,
peer: &DistributedCoreManifest,
policy: &CoreCompatibilityPolicy,
) -> CoreCompatibilityStatus
pub fn check_peer_compatibility( &self, peer: &DistributedCoreManifest, policy: &CoreCompatibilityPolicy, ) -> CoreCompatibilityStatus
Evaluates this Core against a peer and compatibility policy.
Trait Implementations§
Source§impl Clone for DistributedCoreManifest
impl Clone for DistributedCoreManifest
Source§fn clone(&self) -> DistributedCoreManifest
fn clone(&self) -> DistributedCoreManifest
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 DistributedCoreManifest
impl Debug for DistributedCoreManifest
Source§impl<'de> Deserialize<'de> for DistributedCoreManifest
impl<'de> Deserialize<'de> for DistributedCoreManifest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DistributedCoreManifest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DistributedCoreManifest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DistributedCoreManifest
Source§impl PartialEq for DistributedCoreManifest
impl PartialEq for DistributedCoreManifest
Source§impl Serialize for DistributedCoreManifest
impl Serialize for DistributedCoreManifest
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for DistributedCoreManifest
Auto Trait Implementations§
impl Freeze for DistributedCoreManifest
impl RefUnwindSafe for DistributedCoreManifest
impl Send for DistributedCoreManifest
impl Sync for DistributedCoreManifest
impl Unpin for DistributedCoreManifest
impl UnsafeUnpin for DistributedCoreManifest
impl UnwindSafe for DistributedCoreManifest
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