Struct cybergrape::time_domain_buffer::TDBufMeta
source · pub struct TDBufMeta {
data: Vec<Vec<BufferMetadata>>,
num_tags: usize,
}
Expand description
A buffer to store our time-domain spatial data. Ensures that we always have data for each tag for each time slice.
Fields§
§data: Vec<Vec<BufferMetadata>>
Implementations§
source§impl TDBufMeta
impl TDBufMeta
sourcepub fn new(num_tags: usize) -> Self
pub fn new(num_tags: usize) -> Self
Instantiate the buffer so that it ensures that there are num_tags
metadata instances each time we call TDBufMeta::add
.
sourcepub fn add(&mut self, data: Vec<BufferMetadata>)
pub fn add(&mut self, data: Vec<BufferMetadata>)
Insert a time-slice’s worth of metadata into the buffer. Panics if there is the wrong number of metadata entries.
sourcepub fn dump(self) -> Vec<Vec<BufferMetadata>>
pub fn dump(self) -> Vec<Vec<BufferMetadata>>
Return all of the metadata that we have collected, consuming the buffer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TDBufMeta
impl RefUnwindSafe for TDBufMeta
impl Send for TDBufMeta
impl Sync for TDBufMeta
impl Unpin for TDBufMeta
impl UnwindSafe for TDBufMeta
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more