Matthias Beyer
b66371f79b
With this change applied, libimagstore does not export backend representing types anymore. This change is necessar because when we want to switch the `StoreId` implementation from "complex and stateful" to "Stateless and Cow<'_, &str>", we need to be able to have a type which represents a "`StoreId` plus the path of the Store itself". This "the path of the Store itself" is passed around as reference, to minimize runtime impact. Because such a type should not be exported by the libimagstore crate, we make it `pub(crate)` internally. But because the backend APIs also have to use this type, we would export the (private) type in the APIs of the backend. Because of that we make the backend API also non-visible to crate users, which also decreases the surface of the libimagstore API itself. Besides: Remove function `Link::with_base()` which is not needed anymore (was used in tests only). Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
62 lines
1.6 KiB
Rust
62 lines
1.6 KiB
Rust
//
|
|
// imag - the personal information management suite for the commandline
|
|
// Copyright (C) 2015-2019 Matthias Beyer <mail@beyermatthias.de> and contributors
|
|
//
|
|
// This library is free software; you can redistribute it and/or
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
// License as published by the Free Software Foundation; version
|
|
// 2.1 of the License.
|
|
//
|
|
// This library is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
// Lesser General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
// License along with this library; if not, write to the Free Software
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
//
|
|
|
|
#![forbid(unsafe_code)]
|
|
|
|
#![recursion_limit="256"]
|
|
|
|
#![deny(
|
|
dead_code,
|
|
non_camel_case_types,
|
|
non_snake_case,
|
|
path_statements,
|
|
trivial_numeric_casts,
|
|
unstable_features,
|
|
unused_allocation,
|
|
unused_import_braces,
|
|
unused_imports,
|
|
unused_must_use,
|
|
unused_mut,
|
|
unused_qualifications,
|
|
while_true,
|
|
)]
|
|
|
|
#[macro_use] extern crate log;
|
|
extern crate glob;
|
|
extern crate regex;
|
|
extern crate toml;
|
|
#[cfg(test)] extern crate tempdir;
|
|
extern crate semver;
|
|
extern crate walkdir;
|
|
#[macro_use] extern crate is_match;
|
|
extern crate serde_json;
|
|
#[macro_use] extern crate failure;
|
|
extern crate toml_query;
|
|
|
|
extern crate libimagerror;
|
|
extern crate libimagutil;
|
|
|
|
#[macro_use] mod util;
|
|
|
|
pub mod storeid;
|
|
pub mod iter;
|
|
pub mod store;
|
|
mod configuration;
|
|
mod file_abstraction;
|
|
|