pub struct AppConfig {
pub protocols: ProtocolIdSet,
pub inbound_queue: Option<Config>,
}Expand description
Configuration needed for AptosNet applications to register with the network builder. Supports client-only, service-only, and p2p (both) applications.
Fields
protocols: ProtocolIdSetThe set of protocols needed for this application.
inbound_queue: Option<Config>The config for the inbound message queue from network to the application. Used for specifying the queue style (e.g. FIFO vs LIFO) and sub-queue max capacity.
Implementations
sourceimpl AppConfig
impl AppConfig
sourcepub fn client(protocols: impl IntoIterator<Item = ProtocolId>) -> Self
pub fn client(protocols: impl IntoIterator<Item = ProtocolId>) -> Self
AptosNet client configuration. Requires the set of protocols used by the client in its requests.
sourcepub fn service(
protocols: impl IntoIterator<Item = ProtocolId>,
inbound_queue: Config
) -> Self
pub fn service(
protocols: impl IntoIterator<Item = ProtocolId>,
inbound_queue: Config
) -> Self
AptosNet service configuration. Requires both the set of protocols this service can handle and the queue configuration.
sourcepub fn p2p(
protocols: impl IntoIterator<Item = ProtocolId>,
inbound_queue: Config
) -> Self
pub fn p2p(
protocols: impl IntoIterator<Item = ProtocolId>,
inbound_queue: Config
) -> Self
AptosNet peer-to-peer service configuration. A peer-to-peer service is both a client and a service.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl !UnwindSafe for AppConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more