fuel_streams_core::stream

Trait Streamable

Source
pub trait Streamable: StreamEncoder {
    const NAME: &'static str;
    const WILDCARD_LIST: &'static [&'static str];
}
Expand description

Trait for types that can be streamed.

§Examples

use async_trait::async_trait;
use fuel_streams_core::prelude::*;

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
struct MyStreamable {
    data: String,
}

impl StreamEncoder for MyStreamable {}

#[async_trait]
impl Streamable for MyStreamable {
    const NAME: &'static str = "my_streamable";
    const WILDCARD_LIST: &'static [&'static str] = &["*"];
}

Required Associated Constants§

Source

const NAME: &'static str

Source

const WILDCARD_LIST: &'static [&'static str]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Streamable for Block

Source§

const NAME: &'static str = "blocks"

Source§

const WILDCARD_LIST: &'static [&'static str] = _

Source§

impl Streamable for Input

Source§

const NAME: &'static str = "inputs"

Source§

const WILDCARD_LIST: &'static [&'static str] = _

Source§

impl Streamable for Log

Source§

const NAME: &'static str = "logs"

Source§

const WILDCARD_LIST: &'static [&'static str] = _

Source§

impl Streamable for Output

Source§

const NAME: &'static str = "outputs"

Source§

const WILDCARD_LIST: &'static [&'static str] = _

Source§

impl Streamable for Receipt

Source§

const NAME: &'static str = "receipts"

Source§

const WILDCARD_LIST: &'static [&'static str] = _

Source§

impl Streamable for Transaction

Source§

const NAME: &'static str = "transactions"

Source§

const WILDCARD_LIST: &'static [&'static str] = _

Source§

impl Streamable for Utxo

Source§

const NAME: &'static str = "utxos"

Source§

const WILDCARD_LIST: &'static [&'static str] = _