pub struct SubscriptionBuilder { /* private fields */ }Expand description
Builder for a SubscriptionDescriptor.
Every method returns Self by value so chains compose without
intermediate state. The default request matches “give me
everything on this feed”.
Implementations§
Source§impl SubscriptionBuilder
impl SubscriptionBuilder
pub fn new(feed: impl Into<String>) -> Self
Sourcepub fn columns<I, S>(self, cols: I) -> Self
pub fn columns<I, S>(self, cols: I) -> Self
Restrict to a named subset of columns. Pass an empty iterator to clear a previously-set projection.
pub fn filter(self, f: FilterExpr) -> Self
pub fn sampling(self, s: Sampling) -> Self
Sourcepub fn transport_pref(self, p: TransportPreference) -> Self
pub fn transport_pref(self, p: TransportPreference) -> Self
Replace the entire transport preference list.
Sourcepub fn prefer_transport(self, t: TransportTag) -> Self
pub fn prefer_transport(self, t: TransportTag) -> Self
Append a single transport tag to the preference list. Builds an ordered fallback chain when called multiple times.
pub fn format(self, f: FormatPreference) -> Self
pub fn build(self) -> SubscriptionDescriptor
Trait Implementations§
Source§impl Clone for SubscriptionBuilder
impl Clone for SubscriptionBuilder
Source§fn clone(&self) -> SubscriptionBuilder
fn clone(&self) -> SubscriptionBuilder
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 SubscriptionBuilder
impl Debug for SubscriptionBuilder
Source§impl From<SubscriptionBuilder> for SubscriptionDescriptor
impl From<SubscriptionBuilder> for SubscriptionDescriptor
Source§fn from(b: SubscriptionBuilder) -> Self
fn from(b: SubscriptionBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SubscriptionBuilder
impl RefUnwindSafe for SubscriptionBuilder
impl Send for SubscriptionBuilder
impl Sync for SubscriptionBuilder
impl Unpin for SubscriptionBuilder
impl UnsafeUnpin for SubscriptionBuilder
impl UnwindSafe for SubscriptionBuilder
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