Struct netloc::reconciler::Reconciler[][src]

pub struct Reconciler<E: Debug> {
    pub delay: Duration,
    pub ip_resolver: Resolver,
    pub reporters: Vec<Box<dyn Reporter<Error = E>>>,
    pub current_ip: State<IpAddr>,
}

Reconciler encapulates the logic to maintain the reconciliation loop.

In a loop, it obtains the current IP address, and, if it's a new one, reports it to all of the reporters.

Fields

delay: Duration

The delay between the reconciliation attempts.

ip_resolver: Resolver

An IP resolver.

reporters: Vec<Box<dyn Reporter<Error = E>>>

A list of reporters to use.

current_ip: State<IpAddr>

The state to maintain.

Implementations

impl<E: Debug> Reconciler<E>[src]

pub async fn run(&mut self) -> Result<Infallible, Error<E>>[src]

Run the reconciliation loop.

Auto Trait Implementations

impl<E> !RefUnwindSafe for Reconciler<E>[src]

impl<E> !Send for Reconciler<E>[src]

impl<E> !Sync for Reconciler<E>[src]

impl<E> Unpin for Reconciler<E>[src]

impl<E> !UnwindSafe for Reconciler<E>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.