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,
ice_servers: String,
session_sk: SessionSk,
stabilize_interval: u64,
) -> Self
pub fn new( network_id: u32, ice_servers: String, session_sk: SessionSk, stabilize_interval: u64, ) -> Self
Creates a new ProcessorConfig instance without an external address.
Sourcepub fn session_sk(&self) -> SessionSk
pub fn session_sk(&self) -> SessionSk
Return associated SessionSk.
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 default native onion exit advertisement.
Sourcepub fn advertise_onion_relay(self, advertise: bool) -> Self
pub fn advertise_onion_relay(self, advertise: bool) -> Self
Sets whether listen() advertises this node as an onion relay.
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 this node as an onion exit.
Source§impl ProcessorConfig
impl ProcessorConfig
Sourcepub fn webrtc_udp_port_range(&self) -> Result<Option<WebrtcUdpPortRange>>
pub fn webrtc_udp_port_range(&self) -> Result<Option<WebrtcUdpPortRange>>
Returns the validated native WebRTC UDP port range, when configured.
Sourcepub fn onion_exit_policy(self, policy: OnionExitPolicy) -> Self
pub fn onion_exit_policy(self, policy: OnionExitPolicy) -> Self
Sets the onion-exit policy.
Trait Implementations§
Source§impl Clone for ProcessorConfig
impl Clone for ProcessorConfig
Source§fn clone(&self) -> ProcessorConfig
fn clone(&self) -> ProcessorConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§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 Freeze for ProcessorConfig
impl RefUnwindSafe for ProcessorConfig
impl Send for ProcessorConfig
impl Sync for ProcessorConfig
impl Unpin for ProcessorConfig
impl UnsafeUnpin for ProcessorConfig
impl UnwindSafe 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
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.