Module bloop

Module bloop 

Source
Expand description

Module for handling NFC scan events (“bloops”).

This module defines:

  • Bloop: Represents a single NFC scan event tied to a player and client.
  • BloopCollection: A time-limited collection of bloops with pruning of old entries.
  • BloopProvider: Provides access to bloops globally and per client.
  • ProcessedBloop: A simplified representation for persistence.
  • BloopRepository: Async trait abstraction for persisting processed bloops.
  • ProcessedBloopSink: Buffers and persists bloops in batches driven by event notifications.

The system enables tracking and managing bloops efficiently with asynchronous persistence. Features optional integration with graceful shutdown via the tokio-graceful-shutdown crate.

Structs§

Bloop
Represents a single NFC tag scan (“bloop”) event.
BloopCollection
A collection of bloops with a maximum age threshold.
BloopProvider
Provides access to bloops globally and per client, respecting a maximum age.
ProcessedBloop
A simplified representation of a bloop suitable for persistence.
ProcessedBloopSink
A sink that buffers processed bloops and persists them in batches.
ProcessedBloopSinkBuilder
Builder for constructing a ProcessedBloopSink.

Enums§

BuilderError

Traits§

BloopRepository
Interface for persisting processed bloops asynchronously.

Functions§

bloops_for_player
Returns a closure to filter bloops belonging to a specific player.
bloops_since
Returns a closure to filter bloops recorded at or after a given timestamp.