pub struct SubscriptionDescriptor {
pub feed: String,
pub columns: Option<Vec<String>>,
pub filter: FilterExpr,
pub sampling: Option<Sampling>,
pub transport_pref: TransportPreference,
pub format_pref: Option<FormatPreference>,
}Expand description
Request to open one feed.
Every field except feed is optional and represents a preference. A 0.1.0
publisher honours columns and ignores filter and sampling unless
Capabilities advertises support.
Fields§
§feed: StringName of the feed, matching a FeedDescriptor::name.
columns: Option<Vec<String>>Subset of columns to receive. None means “all columns”.
filter: FilterExprRow-level filter applied server-side. 0.1.0 servers refuse anything
other than FilterExpr::Empty.
sampling: Option<Sampling>Optional sampling policy, e.g. “every Nth batch”.
transport_pref: TransportPreferenceOrdered transport preference. Empty means “any”.
format_pref: Option<FormatPreference>Preferred batch format. None means “publisher’s default”.
Implementations§
Source§impl SubscriptionDescriptor
impl SubscriptionDescriptor
pub fn new(feed: impl Into<String>) -> Self
pub fn columns<I, S>(self, cols: I) -> Self
pub fn transport_pref(self, pref: TransportPreference) -> Self
pub fn format(self, fmt: FormatPreference) -> Self
pub fn sampling(self, sampling: Sampling) -> Self
Trait Implementations§
Source§impl Clone for SubscriptionDescriptor
impl Clone for SubscriptionDescriptor
Source§fn clone(&self) -> SubscriptionDescriptor
fn clone(&self) -> SubscriptionDescriptor
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 SubscriptionDescriptor
impl Debug for SubscriptionDescriptor
Source§impl<'de> Deserialize<'de> for SubscriptionDescriptor
impl<'de> Deserialize<'de> for SubscriptionDescriptor
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
Source§impl PartialEq for SubscriptionDescriptor
impl PartialEq for SubscriptionDescriptor
Source§fn eq(&self, other: &SubscriptionDescriptor) -> bool
fn eq(&self, other: &SubscriptionDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SubscriptionDescriptor
impl Serialize for SubscriptionDescriptor
impl StructuralPartialEq for SubscriptionDescriptor
Auto Trait Implementations§
impl Freeze for SubscriptionDescriptor
impl RefUnwindSafe for SubscriptionDescriptor
impl Send for SubscriptionDescriptor
impl Sync for SubscriptionDescriptor
impl Unpin for SubscriptionDescriptor
impl UnsafeUnpin for SubscriptionDescriptor
impl UnwindSafe for SubscriptionDescriptor
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