Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrasiuk committed Jan 11, 2025
1 parent 587a1bf commit d1c429d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/rpc/rpc-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2111,24 +2111,28 @@ pub struct TransportRpcModules<Context = ()> {

impl TransportRpcModules {
/// Sets a custom [`TransportRpcModuleConfig`] for the configured modules.
/// This will overwrite current configuration, if any.
pub fn with_config(mut self, config: TransportRpcModuleConfig) -> Self {
self.config = config;
self
}

/// Sets the [`RpcModule`] for the http transport.
/// This will overwrite current module, if any.
pub fn with_http(mut self, http: RpcModule<()>) -> Self {
self.http = Some(http);
self
}

/// Sets the [`RpcModule`] for the ws transport.
/// This will overwrite current module, if any.
pub fn with_ws(mut self, ws: RpcModule<()>) -> Self {
self.ws = Some(ws);
self
}

/// Sets the [`RpcModule`] for the http transport.
/// This will overwrite current module, if any.
pub fn with_ipc(mut self, ipc: RpcModule<()>) -> Self {
self.ipc = Some(ipc);
self
Expand Down

0 comments on commit d1c429d

Please sign in to comment.