pub struct PreemptiveCircuitConfigBuilder { /* private fields */ }
Expand description
Builder for PreemptiveCircuitConfig
.
Implementations
sourceimpl PreemptiveCircuitConfigBuilder
impl PreemptiveCircuitConfigBuilder
sourcepub fn disable_at_threshold(&mut self, value: usize) -> &mut Self
pub fn disable_at_threshold(&mut self, value: usize) -> &mut Self
If we have at least this many available circuits, we suspend construction of preemptive circuits. whether our available circuits support our predicted exit ports or not.
sourcepub fn initial_predicted_ports(&mut self, value: Vec<u16>) -> &mut Self
pub fn initial_predicted_ports(&mut self, value: Vec<u16>) -> &mut Self
At startup, which exit ports should we expect that the client will want?
(Over time, new ports are added to the predicted list, in response to what the client has actually requested.)
This value cannot be changed on a running Arti client, because doing so would be meaningless.
sourcepub fn prediction_lifetime(&mut self, value: Duration) -> &mut Self
pub fn prediction_lifetime(&mut self, value: Duration) -> &mut Self
After we see the client request a connection to a new port, how long should we predict that the client will still want to have circuits available for that port?
sourcepub fn min_exit_circs_for_port(&mut self, value: usize) -> &mut Self
pub fn min_exit_circs_for_port(&mut self, value: usize) -> &mut Self
How many available circuits should we try to have, at minimum, for each predicted exit port?
sourcepub fn build(&self) -> Result<PreemptiveCircuitConfig, ConfigBuildError>
pub fn build(&self) -> Result<PreemptiveCircuitConfig, ConfigBuildError>
Trait Implementations
sourceimpl Clone for PreemptiveCircuitConfigBuilder
impl Clone for PreemptiveCircuitConfigBuilder
sourcefn clone(&self) -> PreemptiveCircuitConfigBuilder
fn clone(&self) -> PreemptiveCircuitConfigBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl From<PreemptiveCircuitConfig> for PreemptiveCircuitConfigBuilder
impl From<PreemptiveCircuitConfig> for PreemptiveCircuitConfigBuilder
sourcefn from(cfg: PreemptiveCircuitConfig) -> PreemptiveCircuitConfigBuilder
fn from(cfg: PreemptiveCircuitConfig) -> PreemptiveCircuitConfigBuilder
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for PreemptiveCircuitConfigBuilder
impl Send for PreemptiveCircuitConfigBuilder
impl Sync for PreemptiveCircuitConfigBuilder
impl Unpin for PreemptiveCircuitConfigBuilder
impl UnwindSafe for PreemptiveCircuitConfigBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub 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