pub struct MmapObservations { /* private fields */ }Expand description
Memory-mapped observations implementing ObservationTable.
Each column is a memory-mapped flat binary file. Access is zero-copy:
the &[T] slices point directly into the OS page cache.
Implementations§
Source§impl MmapObservations
impl MmapObservations
Sourcepub fn from_cache(cache_dir: &Path) -> Result<(Self, StringInterner)>
pub fn from_cache(cache_dir: &Path) -> Result<(Self, StringInterner)>
Load observations from a cache directory.
The cache must have been created by write_cache.
Trait Implementations§
Source§impl ObservationTable for MmapObservations
impl ObservationTable for MmapObservations
fn len(&self) -> usize
fn ids(&self) -> &[u64]
fn times_mjd(&self) -> &[f64]
fn ra(&self) -> &[f64]
fn dec(&self) -> &[f64]
fn nights(&self) -> &[i64]
Source§fn object_ids(&self) -> &[u64]
fn object_ids(&self) -> &[u64]
Object IDs.
NO_OBJECT (u64::MAX) means no association.fn observatory_codes(&self) -> &[u32]
fn is_empty(&self) -> bool
impl Send for MmapObservations
impl Sync for MmapObservations
Auto Trait Implementations§
impl Freeze for MmapObservations
impl RefUnwindSafe for MmapObservations
impl Unpin for MmapObservations
impl UnsafeUnpin for MmapObservations
impl UnwindSafe for MmapObservations
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> 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