Struct DBFlusher

Source
pub(crate) struct DBFlusher {
    pub(crate) last_bn: u64,
    pub(crate) store: Arc<ShadowKVStore<Box<dyn KVStore>>>,
    pub(crate) fco: Addr<FCO>,
    pub(crate) anvil_chain: Option<ClientHandle>,
    pub(crate) flush_interval_secs: u64,
}

Fields§

§last_bn: u64§store: Arc<ShadowKVStore<Box<dyn KVStore>>>§fco: Addr<FCO>§anvil_chain: Option<ClientHandle>§flush_interval_secs: u64

Implementations§

Source§

impl DBFlusher

Source

pub(crate) fn prepare_flush(&self) -> impl Future<Output = Result<()>> + 'static

Source

pub(crate) fn flush(&mut self, res: Result<()>)

Trait Implementations§

Source§

impl Actor for DBFlusher

Source§

type Context = Context<DBFlusher>

Actor execution context type
Source§

fn started(&mut self, ctx: &mut Self::Context)

Called when an actor gets polled the first time.
Source§

fn stopped(&mut self, _ctx: &mut Self::Context)

Called after an actor is stopped. Read more
§

fn stopping(&mut self, ctx: &mut Self::Context) -> Running

Called after an actor is in Actor::Stopping state. Read more
§

fn start(self) -> Addr<Self>
where Self: Actor<Context = Context<Self>>,

Start a new asynchronous actor, returning its address. Read more
§

fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self>
where Self: Actor<Context = Context<Self>>, F: FnOnce(&mut Context<Self>) -> Self + Send + 'static,

Start new actor in arbiter’s thread.
§

fn create<F>(f: F) -> Addr<Self>
where Self: Actor<Context = Context<Self>>, F: FnOnce(&mut Context<Self>) -> Self,

Start a new asynchronous actor given a Context. Read more
Source§

impl Debug for DBFlusher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Handler<FlushDB> for DBFlusher

Source§

type Result = Pin<Box<dyn ActorFuture<DBFlusher, Output = ()>>>

The type of value that this handler will return. Read more
Source§

fn handle(&mut self, _: FlushDB, _ctx: &mut Context<Self>) -> Self::Result

This method is called for every message received by this actor.
Source§

impl Handler<Stop> for DBFlusher

Source§

type Result = Pin<Box<dyn ActorFuture<DBFlusher, Output = ()>>>

The type of value that this handler will return. Read more
Source§

fn handle(&mut self, _: Stop, _ctx: &mut Context<Self>) -> Self::Result

This method is called for every message received by this actor.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<'de, F, T> Deserialize<'de, As<F>> for T
where F: BareFormula + ?Sized, T: Deserialize<'de, F>,

§

fn deserialize(deserializer: Deserializer<'de>) -> Result<T, DeserializeError>

Deserializes value provided deserializer. Returns deserialized value and the number of bytes consumed from the and of input. Read more
§

fn deserialize_in_place( &mut self, deserializer: Deserializer<'de>, ) -> Result<(), DeserializeError>

Deserializes value in-place provided deserializer. Overwrites self with data from the input. Read more
§

impl<'de, F, T> Deserialize<'de, Ref<F>> for T
where F: BareFormula + ?Sized, T: Deserialize<'de, F> + ?Sized,

§

fn deserialize(de: Deserializer<'de>) -> Result<T, DeserializeError>

Deserializes value provided deserializer. Returns deserialized value and the number of bytes consumed from the and of input. Read more
§

fn deserialize_in_place( &mut self, de: Deserializer<'de>, ) -> Result<(), DeserializeError>

Deserializes value in-place provided deserializer. Overwrites self with data from the input. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<F, T> Serialize<As<F>> for T
where F: BareFormula + ?Sized, T: Serialize<F>,

§

fn serialize<B>( self, sizes: &mut Sizes, buffer: B, ) -> Result<(), <B as Buffer>::Error>
where B: Buffer,

Serializes self into the given buffer. heap specifies the size of the buffer’s heap occupied prior to this call. Read more
§

fn size_hint(&self) -> Option<Sizes>

Returns heap and stack sizes required to serialize self. If some sizes are returned they must be exact. Read more
§

impl<F, T> Serialize<Ref<F>> for T
where F: BareFormula + ?Sized, T: Serialize<F>,

§

fn serialize<B>( self, sizes: &mut Sizes, buffer: B, ) -> Result<(), <B as Buffer>::Error>
where B: Buffer,

Serializes self into the given buffer. heap specifies the size of the buffer’s heap occupied prior to this call. Read more
§

fn size_hint(&self) -> Option<Sizes>

Returns heap and stack sizes required to serialize self. If some sizes are returned they must be exact. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSend for T
where T: Send,