export Magic<>

This commit is contained in:
Numbers
2025-05-29 04:03:07 +02:00
parent 52bd2161fe
commit 295d8b0026

View File

@@ -14,15 +14,15 @@ extern crate alloc;
mod impls { mod impls {
mod primitives; pub mod primitives;
mod magic; pub mod magic;
#[cfg(feature = "alloc")] #[cfg(feature = "alloc")]
mod lib_alloc; pub mod lib_alloc;
#[cfg(feature = "std")] #[cfg(feature = "std")]
mod lib_std; pub mod lib_std;
} }
@@ -55,7 +55,6 @@ pub trait Reader {
} }
pub use derive_macro::OverTheWire;
pub trait OverTheWire: Sized { pub trait OverTheWire: Sized {
fn serialize<T: Writer>(&self, writer: &mut T) -> e::Result<()>; fn serialize<T: Writer>(&self, writer: &mut T) -> e::Result<()>;
@@ -65,6 +64,11 @@ pub trait OverTheWire: Sized {
fn size_hint() -> usize; fn size_hint() -> usize;
} }
//╶───╴Util / Re-exports╶────────────────────────────────────────────────────╴
pub use derive_macro::OverTheWire;
pub use impls::magic::Magic;
#[inline(always)] #[inline(always)]
pub fn min_wire_size<T: OverTheWire>() -> usize { pub fn min_wire_size<T: OverTheWire>() -> usize {
T::size_hint() T::size_hint()