pub struct TriangulationEngineBuilder { /* private fields */ }Expand description
Builder for TriangulationEngine
Implementations§
Source§impl TriangulationEngineBuilder
impl TriangulationEngineBuilder
Sourcepub fn min_sources(self, count: usize) -> Self
pub fn min_sources(self, count: usize) -> Self
Set minimum sources
Sourcepub fn max_sources(self, count: usize) -> Self
pub fn max_sources(self, count: usize) -> Self
Set maximum sources
Sourcepub fn min_tier(self, tier: SourceTier) -> Self
pub fn min_tier(self, tier: SourceTier) -> Self
Set minimum source tier
Sourcepub fn timeout_ms(self, ms: u64) -> Self
pub fn timeout_ms(self, ms: u64) -> Self
Set fetch timeout
Sourcepub fn agreement_ratio(self, ratio: f64) -> Self
pub fn agreement_ratio(self, ratio: f64) -> Self
Set agreement ratio
Sourcepub fn require_https(self, require: bool) -> Self
pub fn require_https(self, require: bool) -> Self
Require HTTPS
Sourcepub fn add_tier1_domain(self, domain: &str) -> Self
pub fn add_tier1_domain(self, domain: &str) -> Self
Add custom Tier 1 domain
Sourcepub fn add_tier2_domain(self, domain: &str) -> Self
pub fn add_tier2_domain(self, domain: &str) -> Self
Add custom Tier 2 domain
Sourcepub fn add_unreliable_domain(self, domain: &str) -> Self
pub fn add_unreliable_domain(self, domain: &str) -> Self
Add custom unreliable domain
Sourcepub fn build(self) -> TriangulationEngine
pub fn build(self) -> TriangulationEngine
Build the engine
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TriangulationEngineBuilder
impl RefUnwindSafe for TriangulationEngineBuilder
impl Send for TriangulationEngineBuilder
impl Sync for TriangulationEngineBuilder
impl Unpin for TriangulationEngineBuilder
impl UnwindSafe for TriangulationEngineBuilder
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 more