pub enum AddChainConfigJsonRpc {
Disabled,
Enabled {
max_pending_requests: NonZeroU32,
max_subscriptions: u32,
},
}Expand description
Variants§
Disabled
No JSON-RPC endpoint is available for this chain. This saves up a lot of resources, but will cause all JSON-RPC requests targeting this chain to fail.
Enabled
Fields
max_pending_requests: NonZeroU32Maximum number of JSON-RPC requests that can be added to a queue if it is not ready to be processed immediately. Any additional request will be immediately rejected.
This parameter is necessary in order to prevent JSON-RPC clients from using up too much memory within the client.
A typical value is 128.
max_subscriptions: u32Maximum number of active subscriptions that can be started through JSON-RPC functions. Any request that causes the JSON-RPC server to generate notifications counts as a subscription. Any additional subscription over this limit will be immediately rejected.
This parameter is necessary in order to prevent JSON-RPC clients from using up too much memory within the client.
While a typical reasonable value would be for example 64, existing UIs tend to start a lot of subscriptions, and a value such as 1024 is recommended.
The JSON-RPC endpoint is enabled. Normal operations.
Trait Implementations§
source§impl Clone for AddChainConfigJsonRpc
impl Clone for AddChainConfigJsonRpc
source§fn clone(&self) -> AddChainConfigJsonRpc
fn clone(&self) -> AddChainConfigJsonRpc
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl RefUnwindSafe for AddChainConfigJsonRpc
impl Send for AddChainConfigJsonRpc
impl Sync for AddChainConfigJsonRpc
impl Unpin for AddChainConfigJsonRpc
impl UnwindSafe for AddChainConfigJsonRpc
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.