pub fn from_metadata_with_trusted_keys<'a, I>(
        metadata_set: &RawSignedMetadataSet<D>,
        root_threshold: u32,
        root_keys: I,
    ) -> Result<Self>
    where
        I: IntoIterator<Item = &'a PublicKey>,
    {
        let mut db = if let Some(root) = metadata_set.root() {
            Database::from_root_with_trusted_keys(root, root_threshold, root_keys)?
        } else {
            return Err(Error::MissingMetadata(Role::Root));
        };

        db.update_metadata_after_root(metadata_set)?;

        Ok(db)
    }
/// Create a new [`Database`] struct from a set of metadata that is assumed to be trusted. The
/// signed root metadata in the `metadata_set` must be signed with at least a `root_threshold`
/// of the provided root_keys. It is not necessary for the root metadata to contain these keys.
Create a new [`Database`] struct from a set of metadata that is assumed to be trusted. The
signed root metadata in the `metadata_set` must be signed with at least a `root_threshold`
of the provided root_keys. It is not necessary for the root metadata to contain these keys.
Create a new [ ` Database ` ] struct from a set of metadata that is assumed to be trusted . The signed root metadata in the ` metadata_set ` must be signed with at least a ` root_threshold ` of the provided root_keys . It is not necessary for the root metadata to contain these keys .
pub fn from_metadata_with_trusted_keys<'a, I>(
        metadata_set: &RawSignedMetadataSet<D>,
        root_threshold: u32,
        root_keys: I,
    ) -> Result<Self>
    where
        I: IntoIterator<Item = &'a PublicKey>,
    {
        let mut db = if let Some(root) = metadata_set.root() {
            Database::from_root_with_trusted_keys(root, root_threshold, root_keys)?
        } else {
            return Err(Error::MissingMetadata(Role::Root));
        };
        db.update_metadata_after_root(metadata_set)?;
        Ok(db)
    }
pub fn from_metadata_with_trusted_keys < ' a , I > ( metadata_set : & RawSignedMetadataSet < D > , root_threshold : u32 , root_keys : I , ) -> Result < Self > where I : IntoIterator < Item = & ' a PublicKey > , { let mut db = if let Some ( root ) = metadata_set . root ( ) { Database :: from_root_with_trusted_keys ( root , root_threshold , root_keys ) ? } else { return Err ( Error :: MissingMetadata ( Role :: Root ) ) ; } ; db . update_metadata_after_root ( metadata_set ) ? ; Ok ( db ) }
Create a new [`Database`] struct from a set of metadata that is assumed to be trusted.
Create a new [ ` Database ` ] struct from a set of metadata that is assumed to be trusted .
metadata_set
&RawSignedMetadataSet<D>
root_threshold
u32
root_keys
I
metadata_set
&RawSignedMetadataSet<D>
root_threshold
u32
root_keys
I