Expand description
Flare IM Core SDK.
This crate is the client-side source of truth for IM behavior: reliable send, local pending state, sync convergence, message projections, protocol mapping, and extension dispatch. Platform bindings adapt this API instead of duplicating delivery or synchronization rules.
Re-exports§
pub use schemars;pub use serde;pub use serde_json;pub use client::*;
Modules§
- client
- 客户端壳层:配置与生命周期、
IMClient、消息/会话 Facade(api)、引擎组装(builder)、事件订阅(events)。 - content
- Message content construction, decoding, preview, and rich document support.
- event
- Event subscription and SDK event payload facade.
- model
- 协议层模型 — 与 flare_proto 对齐;内容构建与解码实现位于
crate::content - plugin
- SDK capability plugin facade.
- prelude
- App-facing imports for the production SDK surface.
- spi
- Stable extension SPI for business SDKs and optional plugins.
- storage
- Storage adapter facade for core-owned persistence implementations.
Structs§
- Custom
Event Definition - User-defined durable event definition.
- Custom
Event Selector - User-defined durable event selector.
version=Nonematches all versions. - Event
Bus - Event
Receiver - Bounded event receiver. Each subscription owns an independent queue.
- RawSdk
Event - Shared raw event envelope for raw subscribers.
- Shared
Event Receiver - Shared raw event receiver used by platform bridges that can reuse cached serialized payloads across multiple subscribers.
Enums§
- Error
Code - 错误代码枚举 - 用于国际化
- Event
Filter - Event filter used by raw subscriptions and route handlers.
- Flare
Error - Flare IM 统一错误类型
- Publish
Outcome - SdkEvent
- 顶层 SDK 事件:按域聚合,内部总线与跨语言绑定均使用此枚举
- SdkEvent
Kind - Top-level SDK event domain.
- SdkEvent
Type - Exact event type. Custom message events, extension events, and notifications keep user namespaces.
- SdkState
- 对外暴露的连接状态(与 kernel FSM
ConnectionState对齐,便于 UI 展示)
Functions§
- delay
- 跨平台异步延时(wasm 用 JS 定时器,native 用 tokio)。供 SDK 上层做有界重试等。