Struct sea_streamer_file::format::Beacon
source · pub struct Beacon {
pub remaining_messages_bytes: u32,
pub items: Vec<Marker>,
}
Fields§
§remaining_messages_bytes: u32
§items: Vec<Marker>
Implementations§
source§impl Beacon
impl Beacon
pub fn empty() -> Self
pub async fn read_from(file: &mut impl ByteSource) -> Result<Self, FileErr>
pub fn write_to(self, sink: &mut impl ByteSink) -> Result<usize, FileErr>
pub fn size(&self) -> usize
sourcepub fn max_markers(space: usize) -> usize
pub fn max_markers(space: usize) -> usize
Calculate the maximum number of markers that can be fitted in the given space
sourcepub fn num_markers(beacon_interval: usize) -> usize
pub fn num_markers(beacon_interval: usize) -> usize
The reasonable number of markers to use, given the beacon_interval
Trait Implementations§
source§impl PartialEq for Beacon
impl PartialEq for Beacon
impl Eq for Beacon
impl StructuralPartialEq for Beacon
Auto Trait Implementations§
impl Freeze for Beacon
impl RefUnwindSafe for Beacon
impl Send for Beacon
impl Sync for Beacon
impl Unpin for Beacon
impl UnwindSafe for Beacon
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more