Crate umsh_text

Crate umsh_text 

Source
Expand description

Text-message support for UMSH.

This crate implements the stateful text-message protocol once, for use by both mobile applications and embedded pagers:

  • codec: exact wire bytes — borrowed decoding and encoding, with extension options preserved for profile-specific validation. Works without alloc.
  • validate: semantic validation of a decoded message in conversation context, selected by a validate::TextProfile.
  • engine: a deterministic sans-I/O reducer owning sequence allocation, deduplication, fragmentation, reassembly, and bounded repair. It receives commands and emits effects and events; platform code owns presentation, storage, and transports.
  • Node-layer convenience wrappers (feature node) for chat-style applications built directly on umsh-node.

Re-exports§

pub use model::ConversationKey;
pub use model::ExtensionOptions;
pub use model::FRAGMENT_BODY_MAX;
pub use model::FRAGMENT_COUNT_MAX;
pub use model::Fragment;
pub use model::MessageSequence;
pub use model::MessageType;
pub use model::REASSEMBLED_BODY_MAX;
pub use model::Regarding;
pub use model::SenderScope;
pub use model::TextMessage;
pub use model::WireRef;
pub use codec::ParseInfo;
pub use codec::encode as encode_text_message;
pub use codec::parse as parse_text_message;

Modules§

codec
Wire codec for text messages: exact bytes only.
engine
Deterministic sans-I/O text-message engine.
model
Wire-level model types for text messages.
text_message
Namespace for raw text-message codec functions.
validate
Semantic validation of decoded text messages in conversation context.

Structs§

MulticastTextChatWrapper
OwnedExtensionOptions
Owned copy of a message’s extension-option block.
OwnedTextMessage
Owned counterpart of TextMessage.
UnicastTextChatWrapper
Thin convenience wrapper for plain unicast text chat over a peer connection.

Enums§

EncodeError
Error returned when encoding text payloads.
ParseError
Error returned when parsing or validating text payloads.
TextReceiveIssue
Reason a received packet did not become a text message callback.
TextSendError
Error returned when sending a text payload through a transport wrapper.

Functions§

parse_text_payload
Parse a typed text payload in the context of the enclosing packet type.