pub struct ProcessorConfig { /* private fields */ }Expand description
ProcessorConfig is usually serialized as json or yaml.
There is a from_config method in ProcessorBuilder used to initialize the Builder with a serialized ProcessorConfig.
Implementations§
Source§impl ProcessorConfig
impl ProcessorConfig
Sourcepub fn new(
network_id: u32,
traversal_servers: String,
delegatee_key: DelegateeKey,
stabilize_interval: u64,
) -> Self
pub fn new( network_id: u32, traversal_servers: String, delegatee_key: DelegateeKey, stabilize_interval: u64, ) -> Self
Creates a new ProcessorConfig instance without an external endpoint hint.
Sourcepub fn delegatee_key(&self) -> DelegateeKey
pub fn delegatee_key(&self) -> DelegateeKey
Return associated DelegateeKey.
Sourcepub fn network_id(&self) -> u32
pub fn network_id(&self) -> u32
Return the overlay this node joins.
Sourcepub fn dht_virtual_nodes(self, positions_per_peer: u16) -> Self
pub fn dht_virtual_nodes(self, positions_per_peer: u16) -> Self
Sets storage-only virtual positions derived per physical peer.
Serialized configs reject values above
MAX_STORAGE_VIRTUAL_POSITIONS_PER_OWNER. This setter is infallible
for direct programmatic use; the core swarm builder normalizes the value
once before storage ownership and protocol advertisement are created.
Sourcepub fn advertise_onion_relay(self, enabled: bool) -> Self
pub fn advertise_onion_relay(self, enabled: bool) -> Self
Enable or disable onion relay advertisement on this node.
When enabling relay while currently Client, upgrades the role to Relay; when disabling
relay, resets the role to Client.
Source§impl ProcessorConfig
impl ProcessorConfig
Sourcepub fn online_node_type(self, node_type: OnlineNodeType) -> Self
pub fn online_node_type(self, node_type: OnlineNodeType) -> Self
Override the runtime family advertised in the online-node registry.
Sourcepub fn network_parameters(&self) -> &Arc<dyn NodeNetworkParameters> ⓘ
pub fn network_parameters(&self) -> &Arc<dyn NodeNetworkParameters> ⓘ
Return the configured NodeNetworkParameters.
Sourcepub fn with_network_parameters<P>(self, params: P) -> Selfwhere
P: NodeNetworkParameters + 'static,
pub fn with_network_parameters<P>(self, params: P) -> Selfwhere
P: NodeNetworkParameters + 'static,
Inject custom NodeNetworkParameters to customize the transport layer (#1291).
Sourcepub fn udp_port_range(&self) -> Option<UdpPortRange>
pub fn udp_port_range(&self) -> Option<UdpPortRange>
Returns the validated local UDP port range when configured on a built-in UDP-capable
transport (TransportNetworkConfig or WebrtcNetworkParameters), or None when no port
range is set or when custom NodeNetworkParameters are injected (custom media manage
their own local socket or radio channel allocation internally).
Sourcepub fn registry_heartbeat_interval(&self) -> Duration
pub fn registry_heartbeat_interval(&self) -> Duration
The longer heartbeat of the two registries this node publishes, online nodes and onion exits: the pause after which each of its registrations is published again.
Sourcepub fn onion_role(self, role: OnionRole<OnionExitOffer>) -> Self
pub fn onion_role(self, role: OnionRole<OnionExitOffer>) -> Self
Sets the onion symbols this process registers (#834 D2).
Sourcepub fn origin_quota(self, config: OriginQuotaConfig) -> Self
pub fn origin_quota(self, config: OriginQuotaConfig) -> Self
Sets runtime-local final-destination quotas keyed by verified origin and logical lane.
Sourcepub fn remote_rpc_proxy(self, proxy: RemoteRpcProxy) -> Self
pub fn remote_rpc_proxy(self, proxy: RemoteRpcProxy) -> Self
Route native remote JSON-RPC requests (nodeDid, answerOffer, acceptAnswer) through
proxy instead of connecting directly.
Sourcepub fn clock(&self) -> &SharedClock
pub fn clock(&self) -> &SharedClock
Return the SharedClock capability configured for this node.
Sourcepub fn with_clock(self, clock: SharedClock) -> Self
pub fn with_clock(self, clock: SharedClock) -> Self
Inject a custom SharedClock capability for deterministic node time.
Trait Implementations§
Source§impl Clone for ProcessorConfig
impl Clone for ProcessorConfig
Source§impl Debug for ProcessorConfig
impl Debug for ProcessorConfig
Source§impl<'de> Deserialize<'de> for ProcessorConfig
impl<'de> Deserialize<'de> for ProcessorConfig
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl FromStr for ProcessorConfig
impl FromStr for ProcessorConfig
Source§impl Serialize for ProcessorConfig
impl Serialize for ProcessorConfig
Source§impl TryFrom<Config> for ProcessorConfig
impl TryFrom<Config> for ProcessorConfig
Auto Trait Implementations§
impl !RefUnwindSafe for ProcessorConfig
impl !UnwindSafe for ProcessorConfig
impl Forget for ProcessorConfig
impl Freeze for ProcessorConfig
impl Move for ProcessorConfig
impl Send for ProcessorConfig
impl Sync for ProcessorConfig
impl Unpin for ProcessorConfig
impl UnsafeUnpin for ProcessorConfig
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for T
impl<T> MaybeSendSync for T
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.