MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / read_le

Function read_le

dstack-mr/src/num.rs:29–34  ·  view source on GitHub ↗
(data: &[u8], index: usize, name: &str)

Source from the content-addressed store, hash-verified

27}
28
29pub(crate) fn read_le<T: Num>(data: &[u8], index: usize, name: &str) -> Result<T> {
30 let data = &data
31 .get(index..)
32 .with_context(|| format!("Missing {name}"))?;
33 T::read_le(data).with_context(|| format!("Invalid {name}"))
34}

Callers 1

authenticode_sha384_hashFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected