// This file is part of bsv. // // bsv is free software: you can redistribute it and/or modify it under the // terms of the GNU Affero General Public License as published by the Free // Software Foundation, either version 3 of the License, or (at your option) // any later version. // // bsv 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 Affero General Public License for // more details. // // You should have received a copy of the Affero GNU General Public License // along with bsv. If not, see . //! # cas-core //! //! `cas-core` provides traits and types to interface with content-addressable //! storage. extern crate thiserror; extern crate digest; extern crate camino; mod error; mod object_id; mod object_type; mod object_metadata; mod pipeline; mod cas; pub use crate::{ error::{Error, Result}, object_id::{ObjectId, hex, write_hex}, object_type::{ObjectType}, object_metadata::{ObjectMetadata}, pipeline::{Pipeline, DefaultPipeline, Reader, Writer, ReadWrapper, WriteWrapper}, cas::{Cas, RefStore}, }; #[macro_export] macro_rules! err { ($($arg:tt)*) => {{ let res = std::fmt::format(format_args!($($arg)*)); Error::err(res) }} }