Skip to main content

Crate use_event

Crate use_event 

Source
Expand description

§use-event

Feature-gated facade crate for RustUse event primitives.

§Install

[dependencies]
use-event = "0.1.0"

Selected features only:

[dependencies]
use-event = { version = "0.1.0", default-features = false, features = ["envelope", "log"] }

§Example

#[cfg(feature = "full")]
{
    use use_event::{EventEnvelope, EventKind, EventName, EventSource};

    let event = EventEnvelope::new(
        EventName::new("command.started"),
        EventKind::Started,
        EventSource::new("cli"),
        "rustuse build",
    );

    assert_eq!(event.name.as_str(), "command.started");
}

§Scope

  • Re-export focused use-event-* crates behind opt-in features.
  • Provide nested modules that mirror child crate names.
  • Provide a small prelude of common primitive event types.

§Non-Goals

  • No implementation logic in this facade.
  • No broker, queue, scheduler, runtime, or persistence layer.
  • No serialization, UUID, async, or event framework behavior.

§Status

Experimental v0.1.0 facade.

§License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license

Re-exports§

pub use use_event_id as id;
pub use use_event_name as name;
pub use use_event_kind as kind;
pub use use_event_status as status;
pub use use_event_source as source;
pub use use_event_target as target;
pub use use_event_payload as payload;
pub use use_event_metadata as metadata;
pub use use_event_timestamp as timestamp;
pub use use_event_envelope as envelope;
pub use use_event_handler as handler;
pub use use_event_dispatch as dispatch;
pub use use_event_stream as stream;
pub use use_event_log as log;

Modules§

prelude

Structs§

DispatchOutcome
EventEnvelope
EventId
EventLog
EventMetadata
EventName
EventPayload
EventSource
EventStream
EventTarget
EventTimestamp

Enums§

DispatchStatus
EventKind
EventStatus

Traits§

EventHandler