#[non_exhaustive]pub struct PointSpec {
pub description: String,
pub deadline: Option<Duration>,
pub fail_closed: bool,
pub budget: Option<Duration>,
}Expand description
A point’s declaration: its description and limits, for introspection.
New fields may be added in a minor release: build one with
PointSpec::new and the builder methods.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.description: StringWhat the point builds, for people and agents reading
Bus::points.
deadline: Option<Duration>The deadline of the point’s listeners that set none themselves;
None takes the kernel’s default.
fail_closed: boolOn a PointKind::Request point, a listener that fails (an
error, a panic, a missed deadline) refuses the request instead of
having its contribution dropped: the emit stops there
(Refusal::failed). Ignored on the other kinds.
budget: Option<Duration>The time one pass of the point’s listeners should take on a
thread (Timings): a pass over it is reported
(OverBudget), never failed. None: no budget.
Implementations§
Source§impl PointSpec
impl PointSpec
Sourcepub fn new(description: impl Into<String>) -> PointSpec
pub fn new(description: impl Into<String>) -> PointSpec
A point described by description, with the kernel’s deadline.
Sourcepub fn deadline(self, deadline: Duration) -> PointSpec
pub fn deadline(self, deadline: Duration) -> PointSpec
The deadline of the point’s listeners that set none themselves.
Sourcepub fn fail_closed(self) -> PointSpec
pub fn fail_closed(self) -> PointSpec
A listener failure refuses the request (PointSpec::fail_closed).
Sourcepub fn budget(self, budget: Duration) -> PointSpec
pub fn budget(self, budget: Duration) -> PointSpec
The time one pass of the point’s listeners should take
(PointSpec::budget).