#[non_exhaustive]pub struct PointSpec {
pub description: String,
pub deadline: Option<Duration>,
pub fail_closed: bool,
}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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
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.
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).
Trait Implementations§
impl Eq for PointSpec
impl StructuralPartialEq for PointSpec
Auto Trait Implementations§
impl Forget for PointSpec
impl Freeze for PointSpec
impl Move for PointSpec
impl RefUnwindSafe for PointSpec
impl Send for PointSpec
impl Sync for PointSpec
impl Unpin for PointSpec
impl UnsafeUnpin for PointSpec
impl UnwindSafe for PointSpec
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