domain tier

domain-encounters

Encounters: stateful visits, sessions, and interactions

Encounters: stateful visits, sessions, and interactions

Tierdomain
Roleunclassified (baselined)
Pathcrates/domain/encounters
Edition2021
Targetsdomain_encounters
Public items39 across 0 modules
Tests29

What it is for

Encounter library crates: stateful visits, sessions, and interactions.

This crate provides:

Capabilities

Encounter:Encounter

Encounter library crates: stateful visits, sessions, and interactions.

Item
pub struct Encounter

Encounter:add

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn add_participant(& mut self, participant : Participant)

Encounter:at

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn at_location(mut self, location : impl Into <String>) -> Self

Encounter:cancel

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn cancel(& mut self) -> Result <()>

Encounter:complete

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn complete(& mut self) -> Result <()>

Encounter:created

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn created_at(& self) -> DateTime <Utc>

Encounter:deleted

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn deleted_at(& self) -> Option <DateTime <Utc>>

Encounter:duration

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn duration(& self) -> Option <Duration>

Encounter:id

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn id(& self) -> Uuid

Encounter:is

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn is_active(& self) -> bool

Encounter:mark

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn mark_no_show(& mut self) -> Result <()>

Encounter:new

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn new(encounter_type : EncounterType, title : impl Into <String>) -> Self

Encounter:participant

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn participant_count(& self) -> usize

Encounter:pause

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn pause(& mut self) -> Result <()>

Encounter:present

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn present_participants(& self) -> Vec <& Participant>

Encounter:resume

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn resume(& mut self) -> Result <()>

Encounter:scheduled

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn scheduled_for(mut self, start : DateTime <Utc>, end : DateTime <Utc>) -> Self

Encounter:set

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn set_notes(& mut self, notes : impl Into <String>)

Encounter:start

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn start(& mut self) -> Result <()>

Encounter:updated

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn updated_at(& self) -> DateTime <Utc>

Encounter:with

Encounter library crates: stateful visits, sessions, and interactions.

Item
Encounter :: fn with_description(mut self, description : impl Into <String>) -> Self

EncounterError

Encounter library crates: stateful visits, sessions, and interactions.

Item
pub enum EncounterError

EncounterState

Encounter library crates: stateful visits, sessions, and interactions.

Item
pub enum EncounterState
EncounterState :: fn is_final(& self) -> bool
EncounterState :: fn can_start(& self) -> bool
EncounterState :: fn can_pause(& self) -> bool
EncounterState :: fn can_complete(& self) -> bool
EncounterState :: fn can_cancel(& self) -> bool
EncounterState :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
EncounterState :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>

EncounterType

Encounter library crates: stateful visits, sessions, and interactions.

Item
pub enum EncounterType
EncounterType :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result

Participant

Encounter library crates: stateful visits, sessions, and interactions.

Item
pub struct Participant
Participant :: fn new(party_id : PartyId, role : impl Into <String>) -> Self
Participant :: fn join(& mut self)
Participant :: fn leave(& mut self)
Participant :: fn is_present(& self) -> bool
Participant :: fn id(& self) -> Uuid

Result

Encounter library crates: stateful visits, sessions, and interactions.

Item
pub type Result<T>: std::result::Result <T, EncounterError>

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

`crate root`

ItemWhat it is
pub enum EncounterErrorErrors that can occur in encounter operations.
pub type Result<T>: std::result::Result <T, EncounterError>Result type for encounter operations.
pub enum EncounterStateState of an encounter.
EncounterState :: fn is_final(& self) -> boolReturns true if the encounter is in a final state.
EncounterState :: fn can_start(& self) -> boolReturns true if the encounter can be started.
EncounterState :: fn can_pause(& self) -> boolReturns true if the encounter can be paused.
EncounterState :: fn can_complete(& self) -> boolReturns true if the encounter can be completed.
EncounterState :: fn can_cancel(& self) -> boolReturns true if the encounter can be cancelled.
EncounterState :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
EncounterState :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>
pub enum EncounterTypeType of encounter.
EncounterType :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
pub struct ParticipantA participant in an encounter.
Participant :: fn new(party_id : PartyId, role : impl Into <String>) -> SelfCreates a new participant.
Participant :: fn join(& mut self)Records when the participant joined.
Participant :: fn leave(& mut self)Records when the participant left.
Participant :: fn is_present(& self) -> boolReturns true if the participant is currently present.
Participant :: fn id(& self) -> Uuid
pub struct EncounterAn encounter (visit, session, or interaction).
Encounter :: fn new(encounter_type : EncounterType, title : impl Into <String>) -> SelfCreates a new encounter.
Encounter :: fn with_description(mut self, description : impl Into <String>) -> SelfSets the description.
Encounter :: fn scheduled_for(mut self, start : DateTime <Utc>, end : DateTime <Utc>) -> SelfSets the scheduled times.
Encounter :: fn at_location(mut self, location : impl Into <String>) -> SelfSets the location.
Encounter :: fn add_participant(& mut self, participant : Participant)Adds a participant.
Encounter :: fn start(& mut self) -> Result <()>Starts the encounter
Encounter :: fn pause(& mut self) -> Result <()>Pauses the encounter
Encounter :: fn resume(& mut self) -> Result <()>Resumes a paused encounter
Encounter :: fn complete(& mut self) -> Result <()>Completes the encounter
Encounter :: fn cancel(& mut self) -> Result <()>Cancels the encounter
Encounter :: fn mark_no_show(& mut self) -> Result <()>Marks as no-show
Encounter :: fn set_notes(& mut self, notes : impl Into <String>)Sets notes.
Encounter :: fn duration(& self) -> Option <Duration>Returns the duration if started and ended.
Encounter :: fn is_active(& self) -> boolReturns true if the encounter is currently active.
Encounter :: fn participant_count(& self) -> usizeReturns the number of participants.
Encounter :: fn present_participants(& self) -> Vec <& Participant>Returns participants currently present.
Encounter :: fn id(& self) -> Uuid
Encounter :: fn created_at(& self) -> DateTime <Utc>
Encounter :: fn updated_at(& self) -> DateTime <Utc>
Encounter :: fn deleted_at(& self) -> Option <DateTime <Utc>>

No pub use re-exports: every item above is declared in this crate.

Boundary

Reaches into foundation, identity.

Shares tier domain with 41 other crates: domain-agreements, domain-ai-report, domain-billing, domain-catalog, domain-classify, domain-comments, domain-competitive-intel, domain-contact, … (41 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)domain
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/domain/encounters
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_domain["domain"] --> n_foundation["foundation"]
  n_domain["domain"] --> n_identity["identity"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-basemodels`foundationnoalways
`identity-parties`identitynoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
chrono^0.4serdenoalways
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
uuid^1v4, v7, serde, jsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio-test^0.4noalways

Build. None.

Depended on by. 1 workspace crate.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_encounters["application-encounters"] -->|uses| SELF
  SELF["domain-encounters"]
  SELF -->|runtime| n_foundation_basemodels["foundation-basemodels"]
  SELF -->|runtime| n_identity_parties["identity-parties"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libdomain_encounters`src/lib.rs`

Error model

Error typeNamed by
EncounterErrorResult

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

1 workspace crate depends on this one: application-encounters.

Verification

KindCount
Unit tests29
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root601

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc3139
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 31
    "No rustdoc detected" : 8

Metrics

MetricValue
Rust source files1
Source lines825
Code lines581
Public API items39
Public modules0
Tests29
Examples0
Cargo features0
Direct runtime dependencies7
Workspace reverse dependencies1
pie showData
    title Public API by kind
    "enum" : 3
    "method" : 33
    "struct" : 2
    "type alias" : 1
pie showData
    title Rust source composition
    "Code" : 581
    "Blank or comment" : 244

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All domain · Manual