pub struct SdkContext { /* private fields */ }Expand description
Process-shared resources that can back many BreezSdk instances.
Construct one with new_shared_sdk_context and pass the same Arc to every
SdkBuilder whose SDKs should share those resources
(a single HTTP client across SSP / chain / LNURL / JWT / etc., a gRPC
channel pool to the Spark operators, the Breez backend gRPC client, …).
Useful for multi-tenant servers that load many wallets in one process.
To share a database connection pool across SDKs, pass a
StorageBackend as
SdkContextConfig::storage: every SDK built from the context reuses it.
The struct is intentionally opaque — all fields are crate-private. There is no way to inject pre-built sub-components: the factory builds them from settings so callers don’t need to know about session stores or connection-manager wiring.
Auto Trait Implementations§
impl Freeze for SdkContext
impl !RefUnwindSafe for SdkContext
impl Send for SdkContext
impl Sync for SdkContext
impl Unpin for SdkContext
impl UnsafeUnpin for SdkContext
impl !UnwindSafe for SdkContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request