pub unsafe fn read<T: EncodeLinkstore + DecodeLinkstore>(&mut self, name: &str) -> Result<EmbeddedValueIterator<'_, T>, Error> {
		let embeds = self.embeds.get(name).ok_or_else(|| Error::NotPresent(name.to_string()))?.as_ref();
		if !embeds.is_empty() && embeds[0].size != core::mem::size_of::<T>() as u64 {
			return Err(Error::MismatchedSize(embeds[0].size, core::mem::size_of::<T>()));
		}
		Ok(EmbeddedValueIterator::new(embeds))
	}
/// Decode & read a value from a linkstore in this binary.
///
/// ## Safety
///
/// This function is unsafe because malformed, corrupted or otherwise invalid data in the binary or unsound decoding implementations may cause undefined behavior.
Decode & read a value from a linkstore in this binary.
Decode & read a value from a linkstore in this binary .
pub unsafe fn read<T: EncodeLinkstore + DecodeLinkstore>(&mut self, name: &str) -> Result<EmbeddedValueIterator<'_, T>, Error> {
		let embeds = self.embeds.get(name).ok_or_else(|| Error::NotPresent(name.to_string()))?.as_ref();
		if !embeds.is_empty() && embeds[0].size != core::mem::size_of::<T>() as u64 {
			return Err(Error::MismatchedSize(embeds[0].size, core::mem::size_of::<T>()));
		}
		Ok(EmbeddedValueIterator::new(embeds))
	}
pub unsafe fn read < T : EncodeLinkstore + DecodeLinkstore > ( & mut self , name : & str ) -> Result < EmbeddedValueIterator < ' _ , T > , Error > { let embeds = self . embeds . get ( name ) . ok_or_else ( | | Error :: NotPresent ( name . to_string ( ) ) ) ? . as_ref ( ) ; if ! embeds . is_empty ( ) && embeds [ 0 ] . size != core :: mem :: size_of :: < T > ( ) as u64 { return Err ( Error :: MismatchedSize ( embeds [ 0 ] . size , core :: mem :: size_of :: < T > ( ) ) ) ; } Ok ( EmbeddedValueIterator :: new ( embeds ) ) }
Decode & read a value from a linkstore in this binary.
Decode & read a value from a linkstore in this binary .
&mut self
name
&str
safety
This function is unsafe because malformed, corrupted or otherwise invalid data in the binary or unsound decoding implementations may cause undefined behavior.
This function is unsafe because malformed corrupted or otherwise invalid data in the binary or unsound decoding implementations may cause undefined behavior .