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