Struct chain_network::grpc::client::Builder
source · pub struct Builder {
legacy_node_id: Option<NodeId>,
}
Expand description
Builder to customize the gRPC client.
Fields§
§legacy_node_id: Option<NodeId>
Implementations§
source§impl Builder
impl Builder
pub fn new() -> Self
sourcepub fn legacy_node_id(&mut self, node_id: NodeId) -> &mut Self
pub fn legacy_node_id(&mut self, node_id: NodeId) -> &mut Self
Make the client add “node-id-bin” metadata with the passed value into subscription requests, for backward compatibility with jormungandr versions prior to 0.9.
pub fn build<T>(&self, service: T) -> Client<T>where T: GrpcService<BoxBody>, T::ResponseBody: Send + Sync + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub async fn connect<D>(&self, dst: D) -> Result<Client<Channel>, Error>where D: TryInto<Endpoint>, D::Error: Into<StdError>,
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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
Mutably borrows from an owned value. Read more
§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request