pub struct ProcessorConfigSerialized { /* private fields */ }Expand description
ProcessorConfigSerialized is a serialized version of ProcessorConfig.
Instead of storing the SessionSk instance, it stores the dumped string representation of the session secret key.
Implementations§
Source§impl ProcessorConfigSerialized
impl ProcessorConfigSerialized
Sourcepub fn new(
network_id: u32,
ice_servers: String,
session_sk: String,
stabilize_interval: u64,
) -> Self
pub fn new( network_id: u32, ice_servers: String, session_sk: String, stabilize_interval: u64, ) -> Self
Creates a new ProcessorConfigSerialized instance without an external address.
Sourcepub fn external_address(self, external_address: String) -> Self
pub fn external_address(self, external_address: String) -> Self
Sets up the external address for WebRTC. This will be used to configure the transport to listen for WebRTC connections in “HOST” mode.
Sourcepub fn webrtc_udp_port_range(self, range: WebrtcUdpPortRange) -> Self
pub fn webrtc_udp_port_range(self, range: WebrtcUdpPortRange) -> Self
Sets the native WebRTC UDP port range bounds.
Sourcepub fn online_node_heartbeat_interval_secs(self, interval_secs: u64) -> Self
pub fn online_node_heartbeat_interval_secs(self, interval_secs: u64) -> Self
Sets the online-node registry heartbeat interval in seconds.
Sourcepub fn online_node_ttl_secs(self, ttl_secs: u64) -> Self
pub fn online_node_ttl_secs(self, ttl_secs: u64) -> Self
Sets the online-node registry descriptor TTL in seconds.
Sourcepub fn online_node_type(self, node_type: OnlineNodeType) -> Self
pub fn online_node_type(self, node_type: OnlineNodeType) -> Self
Sets the runtime family advertised in the online-node registry.
Sourcepub fn advertise_presence(self, advertise: bool) -> Self
pub fn advertise_presence(self, advertise: bool) -> Self
Sets whether listen() advertises this node’s presence.
Sourcepub fn advertise_onion_relay(self, advertise: bool) -> Self
pub fn advertise_onion_relay(self, advertise: bool) -> Self
Sets whether listen() advertises onion relay capability.
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_exit(self, advertise: bool) -> Self
pub fn advertise_onion_exit(self, advertise: bool) -> Self
Sets whether listen() publishes an onion-exit descriptor.
Sourcepub fn onion_exit_heartbeat_interval_secs(self, interval_secs: u64) -> Self
pub fn onion_exit_heartbeat_interval_secs(self, interval_secs: u64) -> Self
Sets the onion-exit registry heartbeat interval in seconds.
Sourcepub fn onion_exit_ttl_secs(self, ttl_secs: u64) -> Self
pub fn onion_exit_ttl_secs(self, ttl_secs: u64) -> Self
Sets the onion-exit registry descriptor TTL in seconds.
Sourcepub fn onion_exit_services(self, services: Vec<OnionExitService>) -> Self
pub fn onion_exit_services(self, services: Vec<OnionExitService>) -> Self
Sets the onion-exit services advertised by this node.
Sourcepub fn onion_exit_policy(self, policy: OnionExitPolicy) -> Self
pub fn onion_exit_policy(self, policy: OnionExitPolicy) -> Self
Sets the onion-exit policy advertised by this node.
Sourcepub fn enable_https_onion_exit(self) -> Self
pub fn enable_https_onion_exit(self) -> Self
Enables only the standard HTTPS-over-TCP onion exit service.
Sourcepub fn enable_default_onion_exit(self) -> Self
pub fn enable_default_onion_exit(self) -> Self
Enables the default native onion exit services.
Trait Implementations§
Source§impl Clone for ProcessorConfigSerialized
impl Clone for ProcessorConfigSerialized
Source§fn clone(&self) -> ProcessorConfigSerialized
fn clone(&self) -> ProcessorConfigSerialized
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for ProcessorConfigSerialized
impl<'de> Deserialize<'de> for ProcessorConfigSerialized
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 TryFrom<Config> for ProcessorConfigSerialized
impl TryFrom<Config> for ProcessorConfigSerialized
Auto Trait Implementations§
impl Freeze for ProcessorConfigSerialized
impl RefUnwindSafe for ProcessorConfigSerialized
impl Send for ProcessorConfigSerialized
impl Sync for ProcessorConfigSerialized
impl Unpin for ProcessorConfigSerialized
impl UnsafeUnpin for ProcessorConfigSerialized
impl UnwindSafe for ProcessorConfigSerialized
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
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.