pub mod arc;
pub mod arrays;
pub mod bound;
pub mod boxes;
pub mod bytes;
pub mod chrono;
pub mod collections;
pub mod cow;
pub mod decimal;
pub mod duration;
pub mod geo;
pub mod imbl;
pub mod notnan;
pub mod option;
pub mod path;
pub mod primitives;
pub mod range;
pub mod regex;
pub mod result;
pub mod reverse;
pub mod roaring;
pub mod specialised;
pub mod string;
pub mod system_time;
pub mod tuple;
pub mod uuid;
pub mod vecs;
pub mod wrapping;

mod skip;
mod walk;

#[cfg(test)]
#[track_caller]
pub fn assert_bincode_compat<T>(v: &T)
where
	T: serde::Serialize + crate::SerializeRevisioned,
{
	use bincode::Options;

	#[cfg(feature = "fixed-width-encoding")]
	let bincode = bincode::options()
		.with_no_limit()
		.with_little_endian()
		.with_fixint_encoding()
		.reject_trailing_bytes()
		.serialize(&v)
		.unwrap();

	#[cfg(not(feature = "fixed-width-encoding"))]
	let bincode = bincode::options()
		.with_no_limit()
		.with_little_endian()
		.with_varint_encoding()
		.reject_trailing_bytes()
		.serialize(&v)
		.unwrap();

	let mut revision = Vec::new();
	v.serialize_revisioned(&mut revision).unwrap();

	assert_eq!(revision, bincode)
}
