Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Library API reference

ncview-rs exposes its internals as a Rust library (ncview-rs) alongside the ncv binary. The full, always-current API documentation is generated from the code’s own rustdoc comments and published with this site under the api/ section.

  • Crate: ncview-rs (MIT OR Apache-2.0)
  • Minimum Rust: 1.90 (edition 2024)
  • Public surface: #![deny(unsafe_code)] — the whole crate is safe Rust

Module map

ModuleResponsibility
dataRead-only dataset and slice abstractions: NetCDF-4/HDF5, GRIB2 (local and remote), coordinates, diff, formula-derived variables (data::formula::FormulaSource), reference manifests, virtual datasets
storageProvider-neutral remote object access: locations (s3://, gs://, az://, abfs[s]://), range cache, typed operations, session state. All network work lives behind this module and its background runtime
renderColor normalization and terminal raster rendering: palettes, land mask, map background, image-protocol selection, viewport-bounded rasterization
uiRatatui view composition: dashboard, canvas, colorbar, sidebar, level bar, timeline, charts, help, popups, layout
eventsTerminal event and session handling: keyboard input, mouse, terminal enter/restore lifecycle
analysisScientific analysis and coordinate-mapping primitives: mapping, projection, time series, equation-editor formula parsing and evaluation (analysis::formula)
appApplication state: view model, generation counters, variable/palette/limits state, decoded working-set bounds
exportFile exporters for the current scientific view (PNG, SVG, JSON sidecar)
errorNcvError — actionable errors carrying file/variable/dimension/capability context

Reading the generated docs

The api/ section of this site is rebuilt automatically whenever the code changes, so signatures, doc comments, and trait implementations always match the source at that commit. It includes:

  • every public type, function, and method with its rustdoc,
  • the NcvError variants and their messages,
  • module-level overviews (the table above comes from them).

For behavior contracts, the narrative pages are the entry point: