1#[cfg(feature = "noop")]
2pub use rspack_cacheable_macros::{
3 disable_cacheable as cacheable, disable_cacheable_dyn as cacheable_dyn,
4};
5pub use rspack_cacheable_macros::{
6 disable_cacheable, disable_cacheable_dyn, enable_cacheable, enable_cacheable_dyn,
7};
8#[cfg(not(feature = "noop"))]
9pub use rspack_cacheable_macros::{
10 enable_cacheable as cacheable, enable_cacheable_dyn as cacheable_dyn,
11};
12pub mod r#dyn;
13pub mod utils;
14pub mod with;
15
16mod context;
17mod deserialize;
18mod serialize;
19
20#[doc(hidden)]
21pub mod __private {
22 #[doc(hidden)]
23 pub extern crate inventory;
24 #[doc(hidden)]
25 pub extern crate rkyv;
26}
27
28#[cfg(not(feature = "noop"))]
29pub use deserialize::from_bytes;
30#[cfg(feature = "noop")]
31pub fn from_bytes<T, C: std::any::Any>(_bytes: &[u8], _context: &C) -> Result<T, DeserializeError> {
32 let _ = deserialize::from_bytes::<u8, u8>;
33 panic!("Cannot use from_bytes when noop feature is enabled")
34}
35
36#[cfg(not(feature = "noop"))]
37pub use serialize::to_bytes;
38#[cfg(feature = "noop")]
39pub fn to_bytes<T, C: std::any::Any>(_value: &T, _ctx: &C) -> Result<Vec<u8>, SerializeError> {
40 let _ = serialize::to_bytes::<u8, u8>;
41 panic!("Cannot use to_bytes when noop feature is enabled")
42}
43
44pub use deserialize::{DeserializeError, Deserializer, Validator};
45pub use serialize::{SerializeError, Serializer};
46pub use xxhash_rust;