pub struct FetchGaps(Box<FetchGapTracker>);Expand description
The Prior Group ID Gap and Prior Object ID Gap conditions of draft-18 Section 12.8 and draft-18 Section 12.9 that one fetch stream shows.
PriorGaps::from_properties refuses what one Object shows. Across the
stream this refuses “A Group contains more than one Object with different
values for Prior Group ID Gap” for the Objects of one Group. It does not
refuse a gap covering an Object received earlier, or an Object within a gap
communicated earlier, though this draft lists both: draft-18 Section 2.1
says of an Object known to exist, “From this state, it can transition to not
existing, but not vice versa”, and of an Object received after it was
recorded as not existing, “This is not a protocol error and the Track is not
malformed.” So whether either makes the Track malformed is ambiguous.
draft-18 Section 10.12.3: “Within each group, objects are sent in Object ID
order; subgroup ID is not used for ordering.”
FetchObjectReader::read_object_header applies it to each Object it reads.
End of Range indicators are not Objects; the caller passes Objects only.
Tuple Fields§
§0: Box<FetchGapTracker>Implementations§
Source§impl FetchGaps
impl FetchGaps
Sourcepub fn check(
&mut self,
group_id: u64,
object_id: u64,
property_block: &[u8],
) -> Result<PriorGaps, CodecError>
pub fn check( &mut self, group_id: u64, object_id: u64, property_block: &[u8], ) -> Result<PriorGaps, CodecError>
Check the next Object on the stream, from its resolved Group ID and
Object ID and its property block, refusing a gap condition with
CodecError::MalformedTrack and a block that does not parse as
crate::object_properties::parse_object_properties does. Records the
Object only when it passes.