Skip to main content

DiscoveryAspectPolicy

Struct DiscoveryAspectPolicy 

Source
pub struct DiscoveryAspectPolicy {
    pub aspect: String,
    pub default_interval_seconds: i64,
    pub min_interval_seconds: i64,
    pub max_interval_seconds: i64,
    pub baseline: bool,
    pub enabled_by_default: bool,
    pub platforms: Vec<String>,
    pub yields: String,
}
Expand description

单个发现方向的策略。

Fields§

§aspect: String

方向名(见 DISCOVERY_ASPECTS)。

§default_interval_seconds: i64

观测周期(秒):多久采一次。

§min_interval_seconds: i64

下限:网关侧改这个方向时不允许低于它(采得太密会把被管机器拖住)。

§max_interval_seconds: i64

上限:同理,采得太疏就失了观测意义。

§baseline: bool

基线面:回答「我是什么」,是自识别与派活的底座 —— 不可关。

§enabled_by_default: bool

未显式声明时的默认开关。

§platforms: Vec<String>

适用平台(见 DISCOVERY_PLATFORMS)。

§yields: String

产出的事实(供人理解「为什么要这个面」),如 os/arch/核数/内存/磁盘/GPU。

Implementations§

Source§

impl DiscoveryAspectPolicy

Source

pub fn supports(&self, platform: &str) -> bool

该方向是否适用于某平台。

Trait Implementations§

Source§

impl Clone for DiscoveryAspectPolicy

Source§

fn clone(&self) -> DiscoveryAspectPolicy

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DiscoveryAspectPolicy

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DiscoveryAspectPolicy

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<DiscoveryAspectPolicy, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for DiscoveryAspectPolicy

Source§

impl JumoItem for DiscoveryAspectPolicy

Source§

fn jumo_id() -> Option<&'static str>

稳定身份:模型条目的全名(如 "Control.Gateway.Management.GatewayHealth")。 Read more
Source§

fn jumo_kind() -> &'static str

.mju item kind: "struct", "state", "enum", "variant", "event", "message", "failure", "cap", "actor", "module", "interface", "storage", "command", "dataflow", "lifecycle", "layer", "dependency_rule", "decision", "failure_policy", "flow", "verify", "target". Read more
Source§

fn jumo_domain() -> &'static str

Domain name, e.g. "Business", "Storage".
Source§

fn jumo_module() -> Option<&'static str>

Module name, e.g. "Design.JumoCore".
Source§

fn jumo_role() -> Option<&'static str>

Message role, if kind is "message": "command", "query", "response".
Source§

fn jumo_identity() -> Option<&'static str>

Failure identity path, if kind is "failure", e.g. "payment.timeout".
Source§

fn jumo_tag() -> Option<&'static str>

Failure tag, if kind is "failure", e.g. "payment".
Source§

fn jumo_storage_kind() -> Option<&'static str>

Storage kind, if kind is "storage": "table", "document", "key_value", "queue", "object", "search", "graph", "cache".
Source§

fn jumo_durability() -> Option<&'static str>

Storage durability, if kind is "storage": "transient", "persistent", "derived".
Source§

fn jumo_parent() -> Option<&'static str>

Actor parent name, if kind is "actor", e.g. "User".
Source§

fn jumo_description() -> Option<&'static str>

Failure description text, if kind is "failure".
Source§

fn jumo_unique_fields() -> &'static [&'static str]

Field names marked #[jumo(unique)].
Source§

impl PartialEq for DiscoveryAspectPolicy

Source§

fn eq(&self, other: &DiscoveryAspectPolicy) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for DiscoveryAspectPolicy

Source§

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
Source§

impl StructuralPartialEq for DiscoveryAspectPolicy

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.