Skip to main content

simbad_resolver/
lib.rs

1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
5// The README is the docs.rs crate-root landing page; its own `rust` fences are
6// this crate's doctests (network ones `no_run`, offline ones runnable — see
7// README.md's per-section notes). Keep prose in the README, not duplicated here.
8#![doc = include_str!("../README.md")]
9#![forbid(unsafe_code)]
10
11// `docs/guide.md`, rendered as its own docs.rs page (this module is otherwise
12// empty — it exists only to give the included guide somewhere to render).
13#[doc = include_str!("../docs/guide.md")]
14pub mod guide {}
15
16pub mod caldwell;
17pub mod identity;
18pub mod normalize;
19pub mod wire;
20
21mod batch;
22mod cache;
23mod config;
24mod error;
25mod orchestrate;
26mod resolver;
27mod sesame;
28mod tap;
29mod types;
30
31pub use crate::batch::{BatchResolver, DrainSummary};
32pub use crate::cache::redb::{BatchDurability, RedbCache, RedbQueue, Store};
33pub use crate::cache::{
34    Cache, CacheError, CachedTarget, PendingItem, PendingState, Queue, QueueError, SearchHit,
35    UpsertOutcome, RANK_EXACT, RANK_FUZZY, RANK_PREFIX, RANK_SUBSTRING,
36};
37pub use crate::config::{ResolverConfig, SimbadConfig};
38pub use crate::error::{Error, ResolveError};
39pub use crate::orchestrate::{
40    CacheBackend, FileCache, Resolution, SimbadResolver, UnresolvedReason,
41};
42pub use crate::resolver::{OfflineResolver, PositionResolver, Resolver};
43pub use crate::sesame::SesameResolver;
44pub use crate::tap::TapResolver;
45pub use crate::types::{
46    map_otype, AliasKind, ObjectType, PositionMatch, ResolvedAlias, ResolvedIdentity, TargetSource,
47};
48
49#[cfg(any(test, feature = "test-util"))]
50pub use crate::resolver::FakeResolver;