Skip to main content

Point

Enum Point 

Source
#[non_exhaustive]
pub enum Point {
Show 20 variants Action { message: &'static str, }, Send { actor: &'static str, message: &'static str, }, Handle { actor: &'static str, message: &'static str, }, Spawn { actor: &'static str, actor_id: u64, output: &'static str, }, Settled { actor: &'static str, actor_id: u64, output: &'static str, took_us: u64, }, Cancelled { actor: &'static str, actor_id: u64, output: &'static str, took_us: u64, }, Source { actor: &'static str, actor_id: u64, output: &'static str, }, Arrived { actor: &'static str, actor_id: u64, output: &'static str, source: u64, }, Pull { actor: &'static str, actor_id: u64, output: &'static str, source: u64, }, Closed { actor: &'static str, actor_id: u64, output: &'static str, took_us: u64, gone: bool, }, Publish { event: &'static str, bus: Bus, subscribers: usize, }, Deliver { event: &'static str, bus: Bus, }, Push { reducer: &'static str, }, Navigate { root: String, to: String, }, Tick { timer: u64, }, Store { op: StoreOp, path: String, field: Option<String>, outside: bool, }, Render { segment: &'static str, took_us: u64, }, Log { level: Level, target: &'static str, file: Option<&'static str>, line: Option<u32>, module: Option<&'static str>, text: String, }, Span { name: &'static str, level: Level, target: &'static str, file: Option<&'static str>, line: Option<u32>, module: Option<&'static str>, fields: String, }, Note(String),
}
Expand description

An observable point, with what identifies it.

Names are short type names: processes::Kill, not a crate path.

New kinds of point come in patch releases, so a match on it outside this crate needs an arm for the ones it doesn’t know yet:

ⓘ
use guinea_trace::Point;

fn known(point: &Point) -> bool {
    match point {
        Point::Action { .. }
        | Point::Send { .. }
        | Point::Handle { .. }
        | Point::Spawn { .. }
        | Point::Settled { .. }
        | Point::Cancelled { .. }
        | Point::Source { .. }
        | Point::Arrived { .. }
        | Point::Pull { .. }
        | Point::Closed { .. }
        | Point::Publish { .. }
        | Point::Deliver { .. }
        | Point::Push { .. }
        | Point::Navigate { .. }
        | Point::Tick { .. }
        | Point::Store { .. }
        | Point::Render { .. }
        | Point::Log { .. }
        | Point::Span { .. }
        | Point::Note(_) => true,
    }
}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Action

The UI asked a feature for something.

Fields

§message: &'static str
§

Send

A message was queued for an actor.

Fields

§actor: &'static str
§message: &'static str
§

Handle

An actor handled a message.

Fields

§actor: &'static str
§message: &'static str
§

Spawn

An actor started background work whose result will come back as output. actor is the address it will come back to, by the id the snapshot lists it under: what a task belongs to is what that actor belongs to.

Fields

§actor: &'static str
§actor_id: u64
§output: &'static str
§

Settled

Background work finished, and its result is on its way to the actor.

Fields

§actor: &'static str
§actor_id: u64
§output: &'static str
§took_us: u64
§

Cancelled

Background work was dropped where it last awaited, because the actor that started it is gone. Nothing comes back.

Fields

§actor: &'static str
§actor_id: u64
§output: &'static str
§took_us: u64
§

Source

An actor opened a source whose items will come to it as output. Recorded under what opened it, which is done with it once it is open: the items are not its work.

Fields

§actor: &'static str
§actor_id: u64
§output: &'static str
§

Arrived

An item came from a source, as output. A root, as a timer’s tick is; source is the id of the Point::Source it came from.

Fields

§actor: &'static str
§actor_id: u64
§output: &'static str
§source: u64
§

Pull

A source is making its next item, which will come as output: what its stream does meanwhile is recorded under this. A root, as Point::Arrived is; source is the id of the Point::Source. Open from when the source is asked for the item until it has it, runs dry or is dropped.

Fields

§actor: &'static str
§actor_id: u64
§output: &'static str
§source: u64
§

Closed

A source ended: it ran dry, or gone - the actor that opened it is gone and the source was dropped where it last awaited.

Fields

§actor: &'static str
§actor_id: u64
§output: &'static str
§took_us: u64
§gone: bool
§

Publish

An event went out.

Fields

§event: &'static str
§bus: Bus
§subscribers: usize
§

Deliver

An event reached a subscriber that is not an actor.

Fields

§event: &'static str
§bus: Bus
§

Push

A reducer was changed.

Fields

§reducer: &'static str
§

Navigate

A router moved.

Fields

§root: String
§

Tick

A timer fired; timer is its id, as the application’s timers list it.

Fields

§timer: u64
§

Store

A persisted value changed.

Fields

§path: String
§field: Option<String>

The declared field the path belongs to, Settings.theme, when the store knows it.

§outside: bool

Whether the change came from outside the process, an edited file.

§

Render

A page or layout drew itself, and how long that took. Recorded only for the frames worth looking at - see observability::Rendering.

Fields

§segment: &'static str
§took_us: u64
§

Log

An ordinary tracing event the application wrote.

Fields

§level: Level
§target: &'static str
§file: Option<&'static str>

Where it was written, as the compiler named the file: relative to the workspace root for the application’s own crates.

§line: Option<u32>
§module: Option<&'static str>
§text: String

The message, then the other fields as name=value.

§

Span

A tracing span the application opened - an #[instrument]ed function, say. Open until the span closes, and current while it is entered; what it took is the time it was entered, not the time it waited in between.

Fields

§name: &'static str
§level: Level

The level it was opened at, as Point::Log’s.

§target: &'static str
§file: Option<&'static str>

Where it was written; see Point::Log.

§line: Option<u32>
§module: Option<&'static str>
§fields: String

Its fields as name=value, as they were when it opened.

§

Note(String)

Anything else worth a line.

Implementations§

Source§

impl Point

Source

pub fn kind(&self) -> &'static str

A short name for the kind of point, for filtering.

Trait Implementations§

Source§

impl Clone for Point

Source§

fn clone(&self) -> Point

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 Point

Source§

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

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

impl Display for Point

Source§

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

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

impl PartialEq for Point

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Point

Auto Trait Implementations§

§

impl Freeze for Point

§

impl RefUnwindSafe for Point

§

impl Send for Point

§

impl Sync for Point

§

impl Unpin for Point

§

impl UnsafeUnpin for Point

§

impl UnwindSafe for Point

Blanket Implementations§

Source§

impl<M> AllowedSignal<M> for M
where M: 'static,

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

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more