Skip to main content

duvet_core/
lib.rs

1// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2// SPDX-License-Identifier: Apache-2.0
3
4#[macro_export]
5macro_rules! ensure {
6    ($cond:expr) => {
7        ensure!($cond, ());
8    };
9    ($cond:expr, $otherwise:expr) => {
10        if !($cond) {
11            return $otherwise;
12        }
13    };
14}
15
16#[cfg(any(test, feature = "testing"))]
17pub mod testing;
18
19#[cfg(any(test, feature = "testing"))]
20pub mod artifact;
21mod cache;
22pub mod contents;
23pub mod diagnostic;
24#[cfg(feature = "diff")]
25pub mod diff;
26pub mod dir;
27pub mod env;
28pub mod file;
29pub mod glob;
30pub mod hash;
31#[cfg(feature = "http")]
32pub mod http;
33pub mod path;
34pub mod progress;
35mod query;
36pub mod vfs;
37
38#[doc(hidden)]
39pub mod macro_support;
40
41pub use ::console;
42pub use cache::Cache;
43pub use duvet_macros::*;
44pub use query::Query;
45
46pub type Result<T = (), E = diagnostic::Error> = core::result::Result<T, E>;