#[non_exhaustive]pub struct SubscribeRequest {
pub harness: Option<String>,
pub session: Option<String>,
}Expand description
Request of usage.steps.subscribe: {} for every notice, or
{harness, session} for the notices of one session. The provider refuses
an unknown member malformed, and so does this type.
harness and session are both optional and also accept null; each
must be given together with the other or not at all. This type does not
check that pairing: the provider refuses a request naming only one
invalid_request, as it does for limit. See
SubscribeRequest::check_pairing.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.harness: Option<String>The producer to follow; see StepRow::harness.
session: Option<String>The session to follow, matched exactly.
Implementations§
Source§impl SubscribeRequest
impl SubscribeRequest
Sourcepub fn for_session(
self,
harness: impl Into<String>,
session: impl Into<String>,
) -> Self
pub fn for_session( self, harness: impl Into<String>, session: impl Into<String>, ) -> Self
Notices only when a row of this harness and session is committed.
Sourcepub fn check_pairing(&self) -> Result<(), &'static str>
pub fn check_pairing(&self) -> Result<(), &'static str>
Reports a request naming only one of harness and session. The
pair comes together or not at all; the provider refuses a request that
names one alone invalid_request. Both together and neither are fine.