domain tier

domain-worklog

Work session tracking for time and activity logging

Work session tracking for time and activity logging

Tierdomain
Roleunclassified (baselined)
Pathcrates/domain/worklog
Edition2021
Targetsdomain_worklog
Public items52 across 0 modules
Tests33

What it is for

Work session tracking library crates for time and activity logging.

This crate provides:

Capabilities

Break

Work session tracking library crates for time and activity logging.

Item
pub struct Break
Break :: fn new() -> Self
Break :: fn with_reason(mut self, reason : impl Into <String>) -> Self
Break :: fn end(& mut self)
Break :: fn duration(& self) -> Duration
Break :: fn is_ongoing(& self) -> bool
Break :: fn default() -> Self
Break :: fn id(& self) -> Uuid

Result

Work session tracking library crates for time and activity logging.

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

SessionStatus

Work session tracking library crates for time and activity logging.

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

TimeEntry:TimeEntry

Work session tracking library crates for time and activity logging.

Item
pub struct TimeEntry

TimeEntry:billable

Work session tracking library crates for time and activity logging.

Item
TimeEntry :: fn billable(mut self, is_billable : bool) -> Self

TimeEntry:created

Work session tracking library crates for time and activity logging.

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

TimeEntry:deleted

Work session tracking library crates for time and activity logging.

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

TimeEntry:duration

Work session tracking library crates for time and activity logging.

Item
TimeEntry :: fn duration(& self) -> Duration

TimeEntry:for

Work session tracking library crates for time and activity logging.

Item
TimeEntry :: fn for_project(mut self, project_id : Uuid) -> Self

TimeEntry:id

Work session tracking library crates for time and activity logging.

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

TimeEntry:new

Work session tracking library crates for time and activity logging.

Item
TimeEntry :: fn new(user_id : Uuid, start_time : DateTime <Utc>, end_time : DateTime <Utc>) -> Self

TimeEntry:overlaps

Work session tracking library crates for time and activity logging.

Item
TimeEntry :: fn overlaps_with(& self, other : & TimeEntry) -> bool

TimeEntry:updated

Work session tracking library crates for time and activity logging.

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

TimeEntry:with

Work session tracking library crates for time and activity logging.

Item
TimeEntry :: fn with_task(mut self, task_reference : impl Into <String>) -> Self
TimeEntry :: fn with_description(mut self, description : impl Into <String>) -> Self
TimeEntry :: fn with_tag(mut self, tag : impl Into <String>) -> Self

WorkSession:WorkSession

Work session tracking library crates for time and activity logging.

Item
pub struct WorkSession

WorkSession:billable

Work session tracking library crates for time and activity logging.

Item
WorkSession :: fn billable(mut self, is_billable : bool) -> Self

WorkSession:break

Work session tracking library crates for time and activity logging.

Item
WorkSession :: fn break_count(& self) -> usize

WorkSession:cancel

Work session tracking library crates for time and activity logging.

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

WorkSession:complete

Work session tracking library crates for time and activity logging.

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

WorkSession:created

Work session tracking library crates for time and activity logging.

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

WorkSession:deleted

Work session tracking library crates for time and activity logging.

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

WorkSession:for

Work session tracking library crates for time and activity logging.

Item
WorkSession :: fn for_project(mut self, project_id : Uuid) -> Self

WorkSession:gross

Work session tracking library crates for time and activity logging.

Item
WorkSession :: fn gross_duration(& self) -> Duration

WorkSession:id

Work session tracking library crates for time and activity logging.

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

WorkSession:is

Work session tracking library crates for time and activity logging.

Item
WorkSession :: fn is_active(& self) -> bool
WorkSession :: fn is_paused(& self) -> bool

WorkSession:net

Work session tracking library crates for time and activity logging.

Item
WorkSession :: fn net_duration(& self) -> Duration

WorkSession:pause

Work session tracking library crates for time and activity logging.

Item
WorkSession :: fn pause(& mut self) -> Result <()>
WorkSession :: fn pause_with_reason(& mut self, reason : impl Into <String>) -> Result <()>

WorkSession:resume

Work session tracking library crates for time and activity logging.

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

WorkSession:set

Work session tracking library crates for time and activity logging.

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

WorkSession:start

Work session tracking library crates for time and activity logging.

Item
WorkSession :: fn start(user_id : Uuid) -> Self

WorkSession:total

Work session tracking library crates for time and activity logging.

Item
WorkSession :: fn total_break_duration(& self) -> Duration

WorkSession:updated

Work session tracking library crates for time and activity logging.

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

WorkSession:with

Work session tracking library crates for time and activity logging.

Item
WorkSession :: fn with_task(mut self, task_reference : impl Into <String>) -> Self
WorkSession :: fn with_description(mut self, description : impl Into <String>) -> Self
WorkSession :: fn with_tag(mut self, tag : impl Into <String>) -> Self

WorklogError

Work session tracking library crates for time and activity logging.

Item
pub enum WorklogError

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 WorklogErrorErrors that can occur in worklog operations.
pub type Result<T>: std::result::Result <T, WorklogError>Result type for worklog operations.
pub enum SessionStatusStatus of a work session.
SessionStatus :: fn is_final(& self) -> boolReturns true if the session is in a final state.
SessionStatus :: fn can_resume(& self) -> boolReturns true if the session can be resumed.
SessionStatus :: fn can_pause(& self) -> boolReturns true if the session can be paused.
SessionStatus :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result
SessionStatus :: fn from_str(s : & str) -> std::result::Result <Self, Self::Err>
pub struct BreakA break or pause in a work session.
Break :: fn new() -> SelfCreates a new break starting now.
Break :: fn with_reason(mut self, reason : impl Into <String>) -> SelfSets the reason for the break.
Break :: fn end(& mut self)Ends the break.
Break :: fn duration(& self) -> DurationReturns the duration of the break.
Break :: fn is_ongoing(& self) -> boolReturns true if the break is ongoing.
Break :: fn default() -> Self
Break :: fn id(& self) -> Uuid
pub struct WorkSessionA work session.
WorkSession :: fn start(user_id : Uuid) -> SelfCreates a new active work session.
WorkSession :: fn for_project(mut self, project_id : Uuid) -> SelfSets the project ID.
WorkSession :: fn with_task(mut self, task_reference : impl Into <String>) -> SelfSets the task reference.
WorkSession :: fn with_description(mut self, description : impl Into <String>) -> SelfSets the description.
WorkSession :: fn with_tag(mut self, tag : impl Into <String>) -> SelfAdds a tag.
WorkSession :: fn billable(mut self, is_billable : bool) -> SelfSets billable status.
WorkSession :: fn pause(& mut self) -> Result <()>Pauses the session
WorkSession :: fn pause_with_reason(& mut self, reason : impl Into <String>) -> Result <()>Pauses with a reason
WorkSession :: fn resume(& mut self) -> Result <()>Resumes the session
WorkSession :: fn complete(& mut self) -> Result <()>Completes the session
WorkSession :: fn cancel(& mut self) -> Result <()>Cancels the session
WorkSession :: fn set_notes(& mut self, notes : impl Into <String>)Sets notes.
WorkSession :: fn total_break_duration(& self) -> DurationReturns the total break duration.
WorkSession :: fn gross_duration(& self) -> DurationReturns the gross duration (including breaks).
WorkSession :: fn net_duration(& self) -> DurationReturns the net duration (excluding breaks).
WorkSession :: fn is_active(& self) -> boolReturns true if the session is currently active.
WorkSession :: fn is_paused(& self) -> boolReturns true if the session is paused.
WorkSession :: fn break_count(& self) -> usizeReturns the number of breaks taken.
WorkSession :: fn id(& self) -> Uuid
WorkSession :: fn created_at(& self) -> DateTime <Utc>
WorkSession :: fn updated_at(& self) -> DateTime <Utc>
WorkSession :: fn deleted_at(& self) -> Option <DateTime <Utc>>
pub struct TimeEntryA time entry (manual time log).
TimeEntry :: fn new(user_id : Uuid, start_time : DateTime <Utc>, end_time : DateTime <Utc>) -> SelfCreates a new time entry.
TimeEntry :: fn for_project(mut self, project_id : Uuid) -> SelfSets the project ID.
TimeEntry :: fn with_task(mut self, task_reference : impl Into <String>) -> SelfSets the task reference.
TimeEntry :: fn with_description(mut self, description : impl Into <String>) -> SelfSets the description.
TimeEntry :: fn with_tag(mut self, tag : impl Into <String>) -> SelfAdds a tag.
TimeEntry :: fn billable(mut self, is_billable : bool) -> SelfSets billable status.
TimeEntry :: fn duration(& self) -> DurationReturns the duration.
TimeEntry :: fn overlaps_with(& self, other : & TimeEntry) -> boolChecks if this entry overlaps with another.
TimeEntry :: fn id(& self) -> Uuid
TimeEntry :: fn created_at(& self) -> DateTime <Utc>
TimeEntry :: fn updated_at(& self) -> DateTime <Utc>
TimeEntry :: fn deleted_at(& self) -> Option <DateTime <Utc>>

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

Boundary

Reaches into foundation.

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/worklog
Vocabulary in force (lexicon)current

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

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

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-basemodels`foundationnoalways

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_worklog["application-worklog"] -->|uses| SELF
  SELF["domain-worklog"]
  SELF -->|runtime| n_foundation_basemodels["foundation-basemodels"]
  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_worklog`src/lib.rs`

Error model

Error typeNamed by
WorklogErrorResult

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-worklog.

Verification

KindCount
Unit tests33
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 rustdoc4052
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 40
    "No rustdoc detected" : 12

Metrics

MetricValue
Rust source files1
Source lines873
Code lines627
Public API items52
Public modules0
Tests33
Examples0
Cargo features0
Direct runtime dependencies6
Workspace reverse dependencies1
pie showData
    title Public API by kind
    "enum" : 2
    "method" : 46
    "struct" : 3
    "type alias" : 1
pie showData
    title Rust source composition
    "Code" : 627
    "Blank or comment" : 246

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