MCPcopy Create free account
hub / github.com/dermesser/integer-encoding-rs / read_fixedint_async

Method read_fixedint_async

src/reader.rs:135–140  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

133#[async_trait::async_trait(?Send)]
134impl<AR: AsyncRead + Unpin> FixedIntAsyncReader for AR {
135 async fn read_fixedint_async<FI: FixedInt>(&mut self) -> Result<FI> {
136 let mut buf = [0_u8; 8];
137 self.read_exact(&mut buf[0..std::mem::size_of::<FI>()])
138 .await?;
139 Ok(FI::decode_fixed(&buf[0..std::mem::size_of::<FI>()]).unwrap())
140 }
141}
142
143impl<R: Read> FixedIntReader for R {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected