pub struct PathHashMapping<T> { /* private fields */ }Expand description
A PathHashMapping reads and writes line-oriented “{package_path}={hash}\n” files, e.g.
“data/static_packages”.
Deprecated.
Implementations§
Source§impl<T> PathHashMapping<T>
impl<T> PathHashMapping<T>
Sourcepub fn deserialize(reader: impl BufRead) -> Result<Self, PathHashMappingError>
pub fn deserialize(reader: impl BufRead) -> Result<Self, PathHashMappingError>
Reads the line-oriented “package-path=hash” static_packages or cache_packages file. Validates the package paths and hashes.
Sourcepub fn contents(&self) -> &SortedVecMap<PackagePath, Hash>
pub fn contents(&self) -> &SortedVecMap<PackagePath, Hash>
Iterator over the contents of the mapping.
Sourcepub fn into_contents(self) -> SortedVecMap<PackagePath, Hash>
pub fn into_contents(self) -> SortedVecMap<PackagePath, Hash>
Iterator over the contents of the mapping, consuming self.
Sourcepub fn hash_for_package(&self, path: &PackagePath) -> Option<Hash>
pub fn hash_for_package(&self, path: &PackagePath) -> Option<Hash>
Get the hash for a package.
Sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the mapping as much as possible.
Trait Implementations§
Source§impl<T: Debug> Debug for PathHashMapping<T>
impl<T: Debug> Debug for PathHashMapping<T>
Source§impl<T, const N: usize> From<[(PackagePath, GenericDigest<FuchsiaMerkleMarker>); N]> for PathHashMapping<T>
impl<T, const N: usize> From<[(PackagePath, GenericDigest<FuchsiaMerkleMarker>); N]> for PathHashMapping<T>
Source§impl<T> FromIterator<(PackagePath, GenericDigest<FuchsiaMerkleMarker>)> for PathHashMapping<T>
impl<T> FromIterator<(PackagePath, GenericDigest<FuchsiaMerkleMarker>)> for PathHashMapping<T>
Source§fn from_iter<I: IntoIterator<Item = (PackagePath, Hash)>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = (PackagePath, Hash)>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<'a, T> IntoIterator for &'a PathHashMapping<T>
impl<'a, T> IntoIterator for &'a PathHashMapping<T>
Source§type Item = (&'a PackagePath, &'a GenericDigest<FuchsiaMerkleMarker>)
type Item = (&'a PackagePath, &'a GenericDigest<FuchsiaMerkleMarker>)
The type of the elements being iterated over.
Source§type IntoIter = Map<Iter<'a, (PackagePath, GenericDigest<FuchsiaMerkleMarker>)>, fn(&(PackagePath, GenericDigest<FuchsiaMerkleMarker>)) -> (&PackagePath, &GenericDigest<FuchsiaMerkleMarker>)>
type IntoIter = Map<Iter<'a, (PackagePath, GenericDigest<FuchsiaMerkleMarker>)>, fn(&(PackagePath, GenericDigest<FuchsiaMerkleMarker>)) -> (&PackagePath, &GenericDigest<FuchsiaMerkleMarker>)>
Which kind of iterator are we turning this into?
Source§impl<T> IntoIterator for PathHashMapping<T>
impl<T> IntoIterator for PathHashMapping<T>
Source§type Item = (PackagePath, GenericDigest<FuchsiaMerkleMarker>)
type Item = (PackagePath, GenericDigest<FuchsiaMerkleMarker>)
The type of the elements being iterated over.
Source§type IntoIter = IntoIter<(PackagePath, GenericDigest<FuchsiaMerkleMarker>)>
type IntoIter = IntoIter<(PackagePath, GenericDigest<FuchsiaMerkleMarker>)>
Which kind of iterator are we turning this into?
Source§impl<T: PartialEq> PartialEq for PathHashMapping<T>
impl<T: PartialEq> PartialEq for PathHashMapping<T>
impl<T: Eq> Eq for PathHashMapping<T>
impl<T> StructuralPartialEq for PathHashMapping<T>
Auto Trait Implementations§
impl<T> Freeze for PathHashMapping<T>
impl<T> RefUnwindSafe for PathHashMapping<T>where
T: RefUnwindSafe,
impl<T> Send for PathHashMapping<T>where
T: Send,
impl<T> Sync for PathHashMapping<T>where
T: Sync,
impl<T> Unpin for PathHashMapping<T>where
T: Unpin,
impl<T> UnsafeUnpin for PathHashMapping<T>
impl<T> UnwindSafe for PathHashMapping<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more