Expand description
Main protocol engine for the Offline Protocol SDK.
This crate ties together all the components (core, transport, router, reliability) into a single easy-to-use API.
All code in this crate is 100% safe Rust with no unsafe blocks.
Re-exports§
pub use config::CustodyConfig;pub use config::DataConfig;pub use config::EncryptionConfig;pub use config::GroupConfig;pub use config::OverflowPolicy;pub use config::PendingQueueConfig;pub use config::ProtocolConfig;pub use config::SecurityConfig;pub use config::CUSTODY_MIN_BYTES_PER_DEPOSITOR;pub use config::DEFAULT_CUSTODY_HOLD_MS;pub use config::DEFAULT_PENDING_TTL_MS;pub use error::Error;pub use error::EstablishmentState;pub use error::Result;pub use error::SessionStateError;pub use events::DecryptionFailureCode;pub use events::DocRemovedBy;pub use events::DorsEscalationPhase;pub use events::DorsEscalationReasonCode;pub use events::DorsReasonCode;pub use events::Event;pub use events::EventCallback;pub use events::GroupInfoMember;pub use events::PresenceSource;pub use events::PresenceStatus;pub use events::UserGroupSummary;pub use file_store::account_storage_namespace;pub use file_store::EnvStoreKey;pub use file_store::FileProtocolStateStorage;pub use file_store::FileStoreError;pub use file_store::FileStorePair;pub use file_store::SealedFileMlsStorage;pub use file_store::SealedState;pub use file_store::StaticStoreKey;pub use file_store::StoreKeyError;pub use file_store::StoreKeyProvider;pub use protocol::GatewayCarrier;pub use protocol::MediaSendOptions;pub use protocol::OfflineProtocol;pub use protocol::SendMessageOptions;pub use protocol_state_storage::ProtocolStateError;pub use protocol_state_storage::ProtocolStateResult;pub use protocol_state_storage::ProtocolStateStorage;pub use protocol_state_storage::MAX_PROTOCOL_STATE_RECORD_TRANSFER_BYTES;pub use transport_manager::TransportManager;pub use visualization::MessageStats;pub use visualization::NetworkLink;pub use visualization::NetworkNode;pub use visualization::NetworkTopology;pub use visualization::NetworkVisualizer;pub use visualization::NodeRole;pub use mls_observability::DecryptionFailureKind;pub use mls_observability::MlsErrorCategory;pub use mls_observability::MlsEventEmitter;pub use mls_observability::MlsLifecycleEvent;pub use mls_observability::MlsOperationContext;pub use mls_observability::NoopMlsEventEmitter;pub use telemetry::AppState;pub use telemetry::TelemetryHost;pub use telemetry::TelemetryOs;pub use telemetry::TelemetryPipe;pub use telemetry::TelemetryStats;pub use telemetry::DeviceCapabilitySnapshot;pub use telemetry::MetricsFrame;pub use telemetry::MlsVerbosity;pub use telemetry::NoopTelemetrySink;pub use telemetry::RoutingDecision;pub use telemetry::RoutingPhase;pub use telemetry::RoutingReasonCode;pub use telemetry::TelemetryConfig;pub use telemetry::TelemetryRecord;pub use telemetry::TelemetrySink;pub use telemetry::TransportStateEvent;
Modules§
- config
- Protocol configuration.
- constants
- Constants used throughout the offline-protocol crate.
- error
- Protocol errors.
- events
- Event types and callbacks.
- file_
store - Built-in file-backed stores, for a host with a filesystem and no platform keystore.
- file_
transfer - File transfer with chunking and reassembly.
- mls
- MLS (Message Layer Security) integration for end-to-end encryption.
- mls_
observability - MLS lifecycle observability primitives.
- mls_
storage_ conformance - The conformance suite for
mls::MlsStorageimplementations, beside the protocol-state one, so a Rust host verifies both backends from here. A portable conformance suite forMlsStorageimplementations. - protocol
- Main protocol engine.
- protocol_
state_ storage - Install-scoped storage for protocol delivery state.
- storage_
conformance - A portable conformance suite for
ProtocolStateStorageimplementations. - telemetry
- Telemetry primitives for the Offline Protocol SDK.
- transport_
manager - Transport management for multi-transport protocol.
- visualization
- Network visualization and topology export.
Structs§
- AckConfig
- Configuration for ACK management.
- Custody
Stats - What a custodian has done, and is holding.
- Deduplicator
Config - Configuration for deduplication.
- Deduplicator
Stats - Statistics about the deduplicator.
- Encrypted
Message - The sealed-envelope types, re-exported so that every path into them keeps working and there is still exactly one definition of each.
- GroupId
- The sealed-envelope types, re-exported so that every path into them keeps working and there is still exactly one definition of each.
- Group
Info - Information about an MLS group.
- Group
Rich Readiness - Snapshot of whether a rich group send right now would seal its extras,
from
OfflineProtocol::group_rich_readiness. Point-in-time and advisory: capability knowledge changes with key-package exchanges, attested adds, and restarts, and the send path re-evaluates the gate itself — this exists so apps can warn before sending (e.g. gray out the attachment button) instead of learning fromGroupRichExtrasDroppedafter the drop. - Group
Send Options - Options for
OfflineProtocol::send_group_message_with: priority and reply threading (as onsend_group_message), plus the rich media fields. - KeyPackage
Bundle - A bundle containing a key package and metadata for distribution.
- Mesh
Relay Config - Tunables for mesh forwarding.
- Mesh
Relay Stats - What this device has carried for other people.
- Mesh
Services - Mesh service registry and message handler.
- MlsManager
- Main MLS manager for end-to-end encryption.
- Retry
Config - Configuration for retry behavior.
- Retry
Queue Stats - Statistics about the retry queue.
- Welcome
Message - The sealed-envelope types, re-exported so that every path into them keeps working and there is still exactly one definition of each.
Enums§
- Custody
Refusal - Why a frame at the drop point was not taken into custody, in the order the chapter’s acceptance table applies them.
- Data
Value - Replicated-document types.
- Deduplicator
Mode - The mode of operation for the deduplicator.
- Relay
Sync State - Relay-side registration state of a group, from
OfflineProtocol::group_relay_sync_state. Point-in-time: transitions are surfaced asGroupRelaySyncChangedevents.
Constants§
- DOC_
SIZE_ WARN_ BYTES - Replicated-document types.
- MAX_
DOC_ BYTES - Replicated-document types.
- MAX_
RELAY_ CAPABILITIES - Upper bound on stored relay capability tokens, and on the byte length of each token. The list is wire-supplied by the relay — bounded so a hostile or broken relay cannot grow resident memory with it.
- MAX_
RELAY_ CAPABILITY_ TOKEN_ BYTES - See
MAX_RELAY_CAPABILITIES. - MAX_
VALUE_ BYTES - Replicated-document types.
Traits§
- MlsStorage
- Trait for MLS key material storage.