#[non_exhaustive]pub enum Precondition {
ReplacementLengthEqualsPayload,
NotFirstObjectOfImplicitSubgroup,
NotAStatusObject,
DatagramPayloadDelimited,
WithinMaxDatagramSize,
}Expand description
A runtime fact a Support::Conditional verdict depends on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ReplacementLengthEqualsPayload
The replacement must be exactly ObjectMeta::payload_len bytes and
the object must not carry a status.
NotFirstObjectOfImplicitSubgroup
The object must not be index 0 of a stream whose subgroup ID is defined as the first object’s ID.
NotAStatusObject
The object must not carry an Object Status.
DatagramPayloadDelimited
The unit’s payload must start at a known offset.
True at the object site on every draft (wire_len - payload_length). At the datagram site it is true on
twelve drafts and false on three counts:
- draft-14, where
AnyDatagramHeaderis aDatagramObjectwhosedecodeconsumes the payload, so the only derivable offset is the whole datagram; - a status datagram, which has no payload slot;
- a datagram whose header did not decode, where the hook still fires but no offset exists.
Failing it is Refusal::PayloadNotDelimited.
WithinMaxDatagramSize
The replacement must fit the connection’s maximum datagram size.
classify cannot evaluate this one. Nothing in
moqtap-client’s transport exposes a maximum datagram size, so
CapCtx has no field for it and this verdict is always
Conditional: the actual answer comes from send_datagram
failing. That makes it the one precondition whose failure is a
ProxyEvent::ActionFailed rather than an ActionRefused — the
action was admitted and the transport rejected it. Stated here
rather than left to be inferred.
Trait Implementations§
Source§impl Clone for Precondition
impl Clone for Precondition
Source§fn clone(&self) -> Precondition
fn clone(&self) -> Precondition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more