pub struct ProcessorBuilder { /* private fields */ }Expand description
ProcessorBuilder is used to initialize a Processor instance.
Implementations§
Source§impl ProcessorBuilder
impl ProcessorBuilder
Sourcepub fn from_serialized(config: &str) -> Result<Self>
pub fn from_serialized(config: &str) -> Result<Self>
initialize a ProcessorBuilder with a serialized ProcessorConfig.
Sourcepub fn from_config(config: &ProcessorConfig) -> Result<Self>
pub fn from_config(config: &ProcessorConfig) -> Result<Self>
initialize a ProcessorBuilder with a ProcessorConfig.
Sourcepub fn storage(self, storage: EntryStorage) -> Self
pub fn storage(self, storage: EntryStorage) -> Self
Set the storage for the processor.
Sourcepub fn measure(self, implement: PeriodicMeasure) -> Self
pub fn measure(self, implement: PeriodicMeasure) -> Self
Set the measure for the processor.
Sourcepub fn dht_finger_table_size(self, size: usize) -> Self
pub fn dht_finger_table_size(self, size: usize) -> Self
Set the number of DHT finger-table slots for the processor’s swarm.
Sourcepub fn dht_virtual_nodes(self, positions_per_peer: u16) -> Self
pub fn dht_virtual_nodes(self, positions_per_peer: u16) -> Self
Set storage-only virtual positions derived per physical peer.
Serialized configs reject values above
rings_core::dht::MAX_STORAGE_VIRTUAL_POSITIONS_PER_OWNER. This
builder 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 reassembly_limits(self, limits: ReassemblyLimits) -> Self
pub fn reassembly_limits(self, limits: ReassemblyLimits) -> Self
Set inbound chunk reassembly limits for the processor’s swarm.
Sourcepub fn online_node_type(self, node_type: OnlineNodeType) -> Self
pub fn online_node_type(self, node_type: OnlineNodeType) -> Self
Set 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
Set 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
Set whether listen() advertises this node as an onion relay.
Sourcepub fn advertise_onion_exit(self, advertise: bool) -> Self
pub fn advertise_onion_exit(self, advertise: bool) -> Self
Set whether listen() publishes this node as an onion exit.
Sourcepub fn registration_task<T>(self, task: T) -> Selfwhere
T: RegistrationTask + 'static,
pub fn registration_task<T>(self, task: T) -> Selfwhere
T: RegistrationTask + 'static,
Add a custom periodic registration task.
Add an already shared custom periodic registration task.
Auto Trait Implementations§
impl !RefUnwindSafe for ProcessorBuilder
impl !UnwindSafe for ProcessorBuilder
impl Freeze for ProcessorBuilder
impl Send for ProcessorBuilder
impl Sync for ProcessorBuilder
impl Unpin for ProcessorBuilder
impl UnsafeUnpin for ProcessorBuilder
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
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.