pub trait Subscription {
// Required method
fn next(&mut self) -> Result<Option<SubscriptionOutput>, Error>;
}Expand description
A trait for consuming field outputs from streams.
This trait provides an abstraction over different implementations of subscriptions to field output streams. Implementors should handle the details of their specific transport mechanism while providing a consistent interface for consumers.
Required Methods§
Sourcefn next(&mut self) -> Result<Option<SubscriptionOutput>, Error>
fn next(&mut self) -> Result<Option<SubscriptionOutput>, Error>
Retrieves the next field output from the subscription.
Returns:
Ok(Some(FieldOutput))if a field output was availableOk(None)if the subscription has ended normallyErr(Error)if an error occurred while retrieving the next field output