Skip to main content

BuiltIndex

Struct BuiltIndex 

Source
pub struct BuiltIndex {
    pub tiers: Vec<TierInfo>,
    pub stars: Vec<IndexStar>,
    pub star_dir: Vec<u32>,
    pub keys: Vec<u64>,
    pub quads: Vec<[u32; 4]>,
    pub source: String,
    pub source_stamp: SourceStamp,
}
Expand description

An index assembled in memory, ready to write (the builder’s output).

Fields§

§tiers: Vec<TierInfo>

Tiers, widest first.

§stars: Vec<IndexStar>

Stars, sorted by declination band then RA (see star_band).

§star_dir: Vec<u32>

First star of each declination band, star_bands + 1 entries.

§keys: Vec<u64>

Pattern keys, sorted within each tier.

§quads: Vec<[u32; 4]>

Pattern stars, parallel to keys.

§source: String

Source database name.

§source_stamp: SourceStamp

Fingerprint of the source database’s files.

Implementations§

Source§

impl BuiltIndex

Source

pub fn file_size(&self) -> u64

Total bytes the file will occupy (to within section padding).

Source

pub fn write(&self, path: &Path) -> Result<()>

Write the index to path, via a temporary file renamed into place, so a reader never sees a half-written index.

§Errors

ArcsecError::CatalogIo if the file cannot be written.

Trait Implementations§

Source§

impl Debug for BuiltIndex

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BuiltIndex

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.