Part of bzrlib.pack View In Hierarchy
Method | iter_records | Iterate over the container, yielding each record as it is read. |
Method | iter_record_objects | Iterate over the container, yielding each record as it is read. |
Method | validate | Validate this container and its records. |
Method | _iter_records | Undocumented |
Method | _iter_record_objects | Undocumented |
Method | _read_format | Undocumented |
Inherited from BaseReader:
Method | __init__ | Constructor. |
Method | reader_func | Undocumented |
Method | _read_line | Undocumented |
Each yielded record will be a 2-tuple of (names, callable), where names is a list and bytes is a function that takes one argument, max_length.
You must not call the callable after advancing the iterator to the next record. That is, this code is invalid:
record_iter = container.iter_records() names1, callable1 = record_iter.next() names2, callable2 = record_iter.next() bytes1 = callable1(None)
As it will give incorrect results and invalidate the state of the ContainerReader.
Raises | ContainerError | if any sort of container corruption is detected, e.g. UnknownContainerFormatError is the format of the container is unrecognised. |
See Also | ContainerReader.read |
Each yielded record will be an object with read and validate methods. Like with iter_records, it is not safe to use a record object after advancing the iterator to yield next record.
Raises | ContainerError | if any sort of container corruption is detected, e.g. UnknownContainerFormatError is the format of the container is unrecognised. |
See Also | iter_records |