pub struct StdoutPlugin;Expand description
Built-in plugin that prints block data to stdout as one JSON line per block.
In structured mode, prints BlockData JSON. Logs go to stderr.
Trait Implementations§
Source§impl Plugin for StdoutPlugin
impl Plugin for StdoutPlugin
Source§fn on_block<'a>(&'a self, block: &'a BlockData) -> PluginFuture<'a>
fn on_block<'a>(&'a self, block: &'a BlockData) -> PluginFuture<'a>
Called for each block. Fired once per slot, before transactions.
Source§fn on_load<'a>(&'a self) -> PluginFuture<'a>
fn on_load<'a>(&'a self) -> PluginFuture<'a>
Called once when the runner starts, before any data is fetched.
Use this to create tables, open connections, or validate config.
Source§fn on_raw<'a>(&'a self, _slot: u64, _raw: &'a Value) -> PluginFuture<'a>
fn on_raw<'a>(&'a self, _slot: u64, _raw: &'a Value) -> PluginFuture<'a>
Called for every non-skipped slot with the full raw JSON-RPC response. Read more
Source§fn on_transaction<'a>(&'a self, _tx: &'a TransactionData) -> PluginFuture<'a>
fn on_transaction<'a>(&'a self, _tx: &'a TransactionData) -> PluginFuture<'a>
Called for each transaction within a block.
Fired in order of
tx_index within the slot.Source§fn on_token_transfer<'a>(
&'a self,
_transfer: &'a TokenTransferData,
) -> PluginFuture<'a>
fn on_token_transfer<'a>( &'a self, _transfer: &'a TokenTransferData, ) -> PluginFuture<'a>
Called for each token balance change within a transaction.
Only fired when the balance actually changed (pre != post).
Source§fn on_account_activity<'a>(
&'a self,
_activity: &'a AccountActivityData,
) -> PluginFuture<'a>
fn on_account_activity<'a>( &'a self, _activity: &'a AccountActivityData, ) -> PluginFuture<'a>
Called for each account touched by a transaction (SOL balance changes).
Source§fn on_skipped_slot<'a>(&'a self, _slot: u64) -> PluginFuture<'a>
fn on_skipped_slot<'a>(&'a self, _slot: u64) -> PluginFuture<'a>
Called when a slot was skipped by the Solana leader (no block produced).
Source§fn on_exit<'a>(&'a self) -> PluginFuture<'a>
fn on_exit<'a>(&'a self) -> PluginFuture<'a>
Called once when the runner is shutting down. Flush buffers, close connections.
Auto Trait Implementations§
impl Freeze for StdoutPlugin
impl RefUnwindSafe for StdoutPlugin
impl Send for StdoutPlugin
impl Sync for StdoutPlugin
impl Unpin for StdoutPlugin
impl UnsafeUnpin for StdoutPlugin
impl UnwindSafe for StdoutPlugin
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