Skip to main content

Crate bitwarden_ipc

Crate bitwarden_ipc 

Source
Expand description

Β§bitwarden-ipc

ModulesΒ§

broadcast πŸ”’
constants πŸ”’
crypto_provider πŸ”’
discover
Discover
endpoint πŸ”’
error πŸ”’
fragmentation πŸ”’
Splits payloads larger than one crypto provider message into fragments and reassembles them on the receiving side.
ipc_client πŸ”’
ipc_client_ext πŸ”’
ipc_client_trait πŸ”’
message πŸ”’
rpc πŸ”’
serde_utils πŸ”’
Global serialization and deserialization utilities for IPC messages. This module provides functions to serialize and deserialize IPC messages in one place, ensuring consistency and reducing code duplication across the IPC crate.
traits πŸ”’
wasm
Re-export types to make sure wasm_bindgen picks them up

StructsΒ§

EndpointSendResult
The outcome of delivering a broadcast message to one member of a BroadcastGroup.
IncomingMessage
An untyped IPC message received from another endpoint.
IpcClientImpl
An IPC client that handles communication between different components and clients. It uses a crypto provider to encrypt and decrypt messages, a communication backend to send and receive messages, and a session repository to persist sessions.
IpcClientSubscription
A subscription to receive messages over IPC. The subcription will start buffering messages after its creation and return them when receive() is called. Messages received before the subscription was created will not be returned.
IpcClientTypedSubscription
A subscription to receive messages over IPC. The subcription will start buffering messages after its creation and return them when receive() is called. Messages received before the subscription was created will not be returned.
NoEncryptionCryptoProvider
A no-op crypto provider that performs no encryption and simply passes messages through as-is.
NoiseCryptoProvider
A CryptoProvider that encrypts IPC traffic using the Noise protocol.
NoiseCryptoProviderState
Session state for the Noise crypto provider.
NoopCommunicationBackend
A no-op implementation of the CommunicationBackend trait.
OutgoingMessage
An untyped IPC message to be sent to another endpoint.
RpcRequestInfo
Information about an incoming RPC request that is not part of the request itself.
TestCommunicationBackend
A test implementation of the CommunicationBackend trait. Provides methods to inject incoming messages and inspect outgoing messages.
TypedIncomingMessage
A typed wrapper around IncomingMessage that stores the payload as a deserialized type.
TypedOutgoingMessage
A typed wrapper around OutgoingMessage that stores the payload as a deserialized type.

EnumsΒ§

BroadcastError
Error returned by IpcClient::broadcast when the group could not be turned into a set of endpoints. Nothing has been sent when this is returned; failures to deliver to an individual endpoint are reported per endpoint instead.
BroadcastGroup
A group of endpoints that a message sent with IpcClient::broadcast is delivered to.
BroadcastResolution
The platform’s answer to β€œwhich endpoints are currently members of this BroadcastGroup?”, returned by CommunicationBackend::resolve.
Endpoint
IPC destination/source endpoint for SDK clients.
ErrorKind
Classification of an IPC error, returned by IpcErrorKind::kind.
HostId
Identifies a host endpoint, one that manages connections for other endpoints.
ReceiveError
RequestError
SendError
Error returned by IpcClient::send.
Source
Describes the source of an incoming IPC message with per-variant metadata.
SubscribeError
TypedReceiveError

TraitsΒ§

CommunicationBackend
This trait defines the interface that will be used to send and receive messages over IPC. It is up to the platform to implement this trait and any necessary thread synchronization and broadcasting.
CommunicationBackendReceiver
This trait defines the interface for receiving messages from the communication backend.
IpcClient
Dyn-compatible trait for IPC client operations.
IpcClientExt
Extension trait providing generic convenience methods on any IpcClient.
IpcErrorKind
Classifies an IPC error into an ErrorKind.
PayloadTypeName
This trait is used to ensure that the payload type has a topic associated with it.
RpcHandler
Trait defining a handler for RPC requests. These can registered with the IPC client and will be used to handle incoming RPC requests.
RpcRequest
Trait representing an RPC request.
SessionRepository
Persists per-destination crypto sessions so they survive across sends and, where the implementation is durable, across restarts.

Type AliasesΒ§

InMemorySessionRepository
An in-memory session repository implementation that stores sessions in a HashMap protected by an RwLock. This is a simple implementation that can be used for testing or in scenarios where persistence is not required.
TestIpcClient