pub struct PointDecl {
pub id: &'static str,
pub kind: PointKind,
pub description: &'static str,
pub deadline: Option<Duration>,
/* private fields */
}Expand description
One line of a library’s contract table: a point it declares, built
from the point’s type in a const (PointDecl::of::<DocClose>(…)),
so the application can read what a library will host before building
anything. declare_all declares a table on a bus.
Fields§
§id: &'static strThe point’s id.
kind: PointKindWhat it is for.
description: &'static strWhat it does, for people and agents reading introspection.
deadline: Option<Duration>The deadline of its listeners that set none; None takes the
bus’s.
Implementations§
Source§impl PointDecl
impl PointDecl
Sourcepub const fn of<P: Point>(description: &'static str) -> PointDecl
pub const fn of<P: Point>(description: &'static str) -> PointDecl
The declaration of the point P, described by description.
Sourcepub const fn deadline(self, deadline: Duration) -> PointDecl
pub const fn deadline(self, deadline: Duration) -> PointDecl
The deadline of its listeners that set none.
Sourcepub fn spec(&self) -> PointSpec
pub fn spec(&self) -> PointSpec
The point’s spec, as Bus::declare_point takes it.
Trait Implementations§
Auto Trait Implementations§
impl Forget for PointDecl
impl Freeze for PointDecl
impl Move for PointDecl
impl RefUnwindSafe for PointDecl
impl Send for PointDecl
impl Sync for PointDecl
impl Unpin for PointDecl
impl UnsafeUnpin for PointDecl
impl UnwindSafe for PointDecl
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