Skip to main content

Crate force_pubsub

Crate force_pubsub 

Source
Expand description

Salesforce Pub/Sub API client for Rust.

This crate provides a gRPC client for the Salesforce Pub/Sub API, supporting subscribe, publish, and schema operations.

Modules§

proto
Generated protobuf types from the Salesforce Pub/Sub API proto.

Structs§

BackoffConfig
Exponential backoff with configurable parameters.
EventMessage
A decoded event received from the subscribe stream.
PubSubConfig
Configuration for the Pub/Sub client.
PubSubHandler
Entry point for all Salesforce Pub/Sub operations.
PublishResponse
Response from a publish operation.
PublishResult
Per-event result from a publish operation.
PublishSink
A bidirectional streaming publish sink for the Salesforce Pub/Sub API.
ReplayId
Opaque replay cursor. Consumers store and pass back; never interpret the bytes.
SchemaCache
Fetches and caches Avro schemas by schema ID.
SchemaInfo
Public-facing schema metadata.
TopicInfo
Public-facing topic metadata (mirrors proto without leaking generated types).

Enums§

PubSubError
All errors from the force-pubsub crate.
PubSubEvent
Items yielded by the subscribe stream.
ReconnectPolicy
Controls reconnection behaviour when the subscribe stream drops.
ReplayPreset
Where to start replaying events when subscribing.

Functions§

decode_avro_typed
Decode Avro-binary bytes directly into a typed struct T using the given schema.
encode_avro
Encode a serializable value to Avro binary using the given schema.

Type Aliases§

Result
Convenience Result alias for Pub/Sub operations.