MCPcopy Index your code
hub / github.com/SoftbearStudios/bitcode / SizedUInt

Interface SizedUInt

src/pack_ints.rs:149–168  ·  view source on GitHub ↗

A [`SizedInt`] that is unsigned.

Source from the content-addressed store, hash-verified

147
148/// A [`SizedInt`] that is unsigned.
149pub trait SizedUInt: SizedInt + TryInto<u128> {
150 fn read(input: &mut &[u8]) -> Result<Self>;
151 fn write(v: Self, out: &mut Vec<u8>);
152 fn wrapping_add(self, rhs: Self::Une) -> Self::Une;
153 fn wrapping_sub(self, rhs: Self) -> Self;
154 fn pack128(v: &[Self], out: &mut Vec<u8>);
155 fn pack64(v: &[Self], out: &mut Vec<u8>);
156 fn pack32(v: &[Self], out: &mut Vec<u8>);
157 fn pack16(v: &[Self], out: &mut Vec<u8>);
158 fn pack8(v: &mut [Self], out: &mut Vec<u8>);
159 fn unpack128<'a>(v: &'a [[u8; 16]], out: &mut CowSlice<'a, Self::Une>) -> Result<()>;
160 fn unpack64<'a>(v: &'a [[u8; 8]], out: &mut CowSlice<'a, Self::Une>) -> Result<()>;
161 fn unpack32<'a>(v: &'a [[u8; 4]], out: &mut CowSlice<'a, Self::Une>) -> Result<()>;
162 fn unpack16<'a>(v: &'a [[u8; 2]], out: &mut CowSlice<'a, Self::Une>) -> Result<()>;
163 fn unpack8<'a>(
164 input: &mut &'a [u8],
165 length: usize,
166 out: &mut CowSlice<'a, Self::Une>,
167 ) -> Result<()>;
168}
169
170macro_rules! impl_simple {
171 () => {

Callers

nothing calls this directly

Implementers 1

pack_ints.rssrc/pack_ints.rs

Calls

no outgoing calls

Tested by

no test coverage detected