pub struct AccountPipe<T: Send> {
pub decoder: Box<dyn for<'a> AccountDecoder<'a, AccountType = T> + Send + Sync + 'static>,
pub processor: Box<dyn Processor<InputType = AccountProcessorInputType<T>> + Send + Sync>,
pub filters: Vec<Box<dyn Filter + Send + Sync + 'static>>,
}
Expand description
A processing pipe that decodes and processes Solana account updates.
AccountPipe
combines an AccountDecoder
and a Processor
to manage
account updates in the pipeline. This struct decodes the raw account data
and then processes the resulting DecodedAccount
with the specified
processing logic.
§Type Parameters
T
: The data type of the decoded account information, as determined by the decoder.
§Fields
decoder
: AnAccountDecoder
that decodes raw account data into structured form.processor
: AProcessor
that handles the processing logic for decoded accounts.filters
: A collection of filters that determine which account updates should be processed. Each filter in this collection is applied to incoming account updates, and only updates that pass all filters (returntrue
) will be processed. If this collection is empty, all updates are processed.
Fields§
§decoder: Box<dyn for<'a> AccountDecoder<'a, AccountType = T> + Send + Sync + 'static>
§processor: Box<dyn Processor<InputType = AccountProcessorInputType<T>> + Send + Sync>
§filters: Vec<Box<dyn Filter + Send + Sync + 'static>>
Trait Implementations§
Source§impl<T: Send> AccountPipes for AccountPipe<T>
impl<T: Send> AccountPipes for AccountPipe<T>
fn run<'life0, 'async_trait>(
&'life0 mut self,
account_with_metadata: (AccountMetadata, Account),
metrics: Arc<MetricsCollection>,
) -> Pin<Box<dyn Future<Output = CarbonResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn filters(&self) -> &Vec<Box<dyn Filter + Send + Sync + 'static>>
Auto Trait Implementations§
impl<T> Freeze for AccountPipe<T>
impl<T> !RefUnwindSafe for AccountPipe<T>
impl<T> Send for AccountPipe<T>
impl<T> Sync for AccountPipe<T>
impl<T> Unpin for AccountPipe<T>
impl<T> !UnwindSafe for AccountPipe<T>
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> 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