pub struct LocalRpcCommitSource { /* private fields */ }Expand description
Optional local Litecoin Core: it may start, stop, restart or hang at any
time. Holds only the URL and cookie path; every lookup and probe reads the
cookie, and the chain and txindex are verified again whenever it changes.
Every RPC is bounded (see rpc), so a stopped or hung Core costs a lookup
at most its budget before the next source is tried.
Implementations§
Source§impl LocalRpcCommitSource
impl LocalRpcCommitSource
pub const PROBE_INTERVAL: Duration
Sourcepub const PROBE_BUDGET: Duration
pub const PROBE_BUDGET: Duration
Total time one probe may take, cookie verification included.
Sourcepub const FETCH_BUDGET: Duration
pub const FETCH_BUDGET: Duration
Total time one lookup may take, cookie verification included.
pub fn new(chain: Chain, rpc_url: String, cookie_file: PathBuf) -> Self
pub fn with_probe_interval(self, interval: Duration) -> Self
pub fn with_budgets(self, probe: Duration, fetch: Duration) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LocalRpcCommitSource
impl RefUnwindSafe for LocalRpcCommitSource
impl Send for LocalRpcCommitSource
impl Sync for LocalRpcCommitSource
impl Unpin for LocalRpcCommitSource
impl UnsafeUnpin for LocalRpcCommitSource
impl UnwindSafe for LocalRpcCommitSource
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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