Skip to main content

Crate etherbird

Crate etherbird 

Source
Expand description

Supervised asynchronous resources with automatic recovery.

Implement Lifecycle and expose a typed client wrapper around Supervisor. Operations run once by default; retries require explicit per-operation opt-in. Lifecycle futures must be cancellation-safe.

Macros§

managed_client
Generate a typed proxy with ordinary async client methods returning owned results. Methods must return the lifecycle error type. Borrowed/streaming results need a manual wrapper. Client::new(supervisor) selects direct supervision for a concurrency-safe resource; from_supervisor is an alias. This is the default backend. With the pool feature, Client::from_pool(pool) selects exclusive dispatch with type Client<ManagedResourceProxy<Hooks>>. Both expose the same generated methods and configuration access through managed. Direct calls are caller-owned and do not promise the pool’s independent shutdown drain. See crate::SupervisedResourceProxy for cancellation semantics.

Structs§

BoundedFifoQueue
FIFO queue with a fixed admission limit. Rejected items are dropped.
Config
ConfigError
A framework configuration field and the rule it violates. Contains no secrets.
DisconnectOnDrop
Signal connection loss before releasing ownership of an incomplete scope.
FifoQueue
First-in, first-out operation queue. Priority metadata does not affect ordering.
Generation
Opaque identity for one resource generation, independent of numeric counters.
GenerationMismatch
The supplied token belongs to a different resource generation.
GenerationValue
A value accessible only with its originating generation token.
ManagedResourceProxy
Stable proxy backing typed client wrappers. Attributes are replayed through named setters.
Pool
Demand-grown pool of independently supervised resources. Minimum counts all entries. Start inside a Tokio runtime. Lower priority numbers run first when priority_queue is enabled.
PoolConfig
PriorityQueue
Heap queue. Queued operations sort lower priorities first and FIFO on ties.
QueuedOperation
Opaque queued work with scheduling metadata. Only the pool can execute it.
ResourceHandle
A specific resource generation. Old handles do not silently become new resources.
ResourceLease
Exclusive reservation of a supervisor; reconnection does not end the lease.
ResourceStatus
RetireOnDrop
Retire a resource slot when a scope ends before the adapter confirms completion.
RetryPolicy
Bounds for an explicitly retryable operation. The caller must ensure replay is safe.
SupervisedResourceProxy
Stable proxy for a single resource supporting concurrent operations.
Supervisor
Cloneable client-facing handle. Start inside a Tokio runtime. Dropping the last supervisor requests shutdown; stop().await waits for teardown.

Enums§

Error
LifecycleFailurePolicy
Scheduling decision for an initialization or disconnect-watch error.
OperationFailurePolicy
Recovery decision for an operation error; independent of replay permission.
QueueError
Rejection from a custom queue, including bounded queues at capacity.
ResourceState

Traits§

Lifecycle
Protocol-specific lifecycle hooks. Resources usually contain their own interior mutability.
ManagedClientBackend
Execution backend for methods generated by crate::managed_client!. Implementations select whether calls require exclusive pooled access or can execute concurrently. Dispatch is static and does not box operation futures.
OperationQueue
Synchronous queue used under the pool’s internal lock.

Type Aliases§

AttributeSetter
CreatedHook
LifecycleFuture

Attribute Macros§

async_trait