pub trait LogBufferRecords {
// Required methods
fn record_count(&self) -> usize;
fn encode_record(&self, index: usize, buf: &mut BytesMut);
}Expand description
A log object’s Log_Buffer as ReadRange pages it: the resident records, oldest first, each framed on demand as its Clause 21 record production.
The records align element for element with
crate::traits::BACnetObject::log_record_identities_internal. A page
encodes only the records it visits, so a narrow window over a full log
stays cheap.
Required Methods§
Sourcefn record_count(&self) -> usize
fn record_count(&self) -> usize
The number of resident records.
Sourcefn encode_record(&self, index: usize, buf: &mut BytesMut)
fn encode_record(&self, index: usize, buf: &mut BytesMut)
Append the record at index (0 is the oldest) to buf.
Encoding cannot fail: the built-in logs refuse a record that would not
encode when it is added, and an implementation must keep that promise
too. Panics when index is not below
record_count.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".