pub struct SubscribeConfig {
pub replay_from_slot: Option<i64>,
pub compression: Option<Compression>,
}Expand description
Cross-cutting subscribe options the client sets in the config object.
Fields§
§replay_from_slot: Option<i64>Last slot the client already processed. On reconnect the server replays from this slot (inclusive) rather than streaming the full history.
compression: Option<Compression>Notification-frame compression the client opted into. None keeps the
uncompressed Text path.
Implementations§
Source§impl SubscribeConfig
impl SubscribeConfig
Sourcepub fn from_value(config: Option<&Value>) -> Self
pub fn from_value(config: Option<&Value>) -> Self
Parse the cross-cutting options out of a subscribe config object. Per-kind fields are ignored, and a missing or malformed object yields defaults (all off), so a subscribe never fails on these optional fields.
Trait Implementations§
Source§impl Clone for SubscribeConfig
impl Clone for SubscribeConfig
Source§fn clone(&self) -> SubscribeConfig
fn clone(&self) -> SubscribeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubscribeConfig
impl Debug for SubscribeConfig
Source§impl Default for SubscribeConfig
impl Default for SubscribeConfig
Source§fn default() -> SubscribeConfig
fn default() -> SubscribeConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SubscribeConfig
impl<'de> Deserialize<'de> for SubscribeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SubscribeConfig
Source§impl PartialEq for SubscribeConfig
impl PartialEq for SubscribeConfig
Source§fn eq(&self, other: &SubscribeConfig) -> bool
fn eq(&self, other: &SubscribeConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SubscribeConfig
impl Serialize for SubscribeConfig
impl StructuralPartialEq for SubscribeConfig
Auto Trait Implementations§
impl Freeze for SubscribeConfig
impl RefUnwindSafe for SubscribeConfig
impl Send for SubscribeConfig
impl Sync for SubscribeConfig
impl Unpin for SubscribeConfig
impl UnsafeUnpin for SubscribeConfig
impl UnwindSafe for SubscribeConfig
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