Skip to main content

CreateStreamIn

Struct CreateStreamIn 

Source
pub struct CreateStreamIn<K> {
    pub live: Option<bool>,
    pub gt: Option<K>,
    pub gte: Option<K>,
    pub lt: Option<K>,
    pub lte: Option<K>,
    pub reverse: Option<bool>,
    pub keys: Option<bool>,
    pub values: Option<bool>,
    pub limit: Option<i64>,
    pub fill_cache: Option<bool>,
    pub key_encoding: Option<String>,
    pub value_encoding: Option<String>,
}

Fields§

§live: Option<bool>

live (boolean, default: false): Keep the stream open and emit new messages as they are received

§gt: Option<K>

gt (greater than), gte (greater than or equal) define the lower bound of the range to be streamed

§gte: Option<K>§lt: Option<K>

lt (less than), lte (less than or equal) define the higher bound of the range to be streamed. Only key/value pairs where the key is less than (or equal to) this option will be included in the range. When reverse=true the order will be reversed, but the records streamed will be the same.

§lte: Option<K>§reverse: Option<bool>

reverse (boolean, default: false): a boolean, set true and the stream output will be reversed. Beware that due to the way LevelDB works, a reverse seek will be slower than a forward seek.

§keys: Option<bool>

keys (boolean, default: true): whether the data event should contain keys. If set to true and values set to false then data events will simply be keys, rather than objects with a key property.

§values: Option<bool>

values (boolean, default: true): whether the data event should contain values. If set to true and keys set to false then data events will simply be values, rather than objects with a value property.

§limit: Option<i64>

limit (number, default: -1): limit the number of results collected by this stream. This number represents a maximum number of results and may not be reached if you get to the end of the data first. A value of -1 means there is no limit. When reverse=true the highest keys will be returned instead of the lowest keys.

§fill_cache: Option<bool>

fillCache (boolean, default: false): wheather LevelDB’s LRU-cache should be filled with data read.

§key_encoding: Option<String>

keyEncoding / valueEncoding (string): the encoding applied to each read piece of data.

§value_encoding: Option<String>

Implementations§

Source§

impl<K> CreateStreamIn<K>

Source

pub fn live(self, live: bool) -> Self

Source

pub fn gt(self, v: K) -> Self

Source

pub fn gte(self, v: K) -> Self

Source

pub fn lt(self, v: K) -> Self

Source

pub fn lte(self, v: K) -> Self

Source

pub fn reverse(self, reversed: bool) -> Self

Source

pub fn keys_values(self, keys: bool, values: bool) -> Self

Source

pub fn encoding(self, keys: String, values: String) -> Self

Source

pub fn limit(self, limit: i64) -> Self

Trait Implementations§

Source§

impl<K: Debug> Debug for CreateStreamIn<K>

Source§

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

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

impl<K> Default for CreateStreamIn<K>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<K> Serialize for CreateStreamIn<K>
where K: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<K> Freeze for CreateStreamIn<K>
where K: Freeze,

§

impl<K> RefUnwindSafe for CreateStreamIn<K>
where K: RefUnwindSafe,

§

impl<K> Send for CreateStreamIn<K>
where K: Send,

§

impl<K> Sync for CreateStreamIn<K>
where K: Sync,

§

impl<K> Unpin for CreateStreamIn<K>
where K: Unpin,

§

impl<K> UnsafeUnpin for CreateStreamIn<K>
where K: UnsafeUnpin,

§

impl<K> UnwindSafe for CreateStreamIn<K>
where K: UnwindSafe,

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.