pub struct ArtifactIdBuilder<H: HashAlgorithm, P: HashProvider<H>> { /* private fields */ }
Expand description
A builder for ArtifactId
s.
Implementations§
Source§impl ArtifactIdBuilder<Sha256, RustCrypto>
impl ArtifactIdBuilder<Sha256, RustCrypto>
Sourcepub fn with_rustcrypto() -> Self
pub fn with_rustcrypto() -> Self
Create a new ArtifactIdBuilder
with RustCrypto
as the HashProvider
.
Source§impl ArtifactIdBuilder<Sha256, BoringSsl>
impl ArtifactIdBuilder<Sha256, BoringSsl>
Sourcepub fn with_boringssl() -> Self
pub fn with_boringssl() -> Self
Create a new ArtifactIdBuilder
with BoringSsl
as the HashProvider
.
Source§impl ArtifactIdBuilder<Sha256, OpenSsl>
impl ArtifactIdBuilder<Sha256, OpenSsl>
Sourcepub fn with_openssl() -> Self
pub fn with_openssl() -> Self
Create a new ArtifactIdBuilder
with OpenSsl
as the HashProvider
.
Source§impl<H: HashAlgorithm, P: HashProvider<H>> ArtifactIdBuilder<H, P>
impl<H: HashAlgorithm, P: HashProvider<H>> ArtifactIdBuilder<H, P>
Sourcepub fn with_provider(provider: P) -> Self
pub fn with_provider(provider: P) -> Self
Create a new ArtifactIdBuilder
with the given HashProvider
.
Sourcepub fn identify_bytes(&self, bytes: &[u8]) -> ArtifactId<H>
pub fn identify_bytes(&self, bytes: &[u8]) -> ArtifactId<H>
Create an ArtifactId
for the given bytes.
Sourcepub fn identify_string(&self, s: &str) -> ArtifactId<H>
pub fn identify_string(&self, s: &str) -> ArtifactId<H>
Create an ArtifactId
for the given string.
Sourcepub fn identify_file(
&self,
file: &mut File,
) -> Result<ArtifactId<H>, ArtifactIdError>
pub fn identify_file( &self, file: &mut File, ) -> Result<ArtifactId<H>, ArtifactIdError>
Create an ArtifactId
for the given file.
Sourcepub fn identify_path(
&self,
path: &Path,
) -> Result<ArtifactId<H>, ArtifactIdError>
pub fn identify_path( &self, path: &Path, ) -> Result<ArtifactId<H>, ArtifactIdError>
Create an ArtifactId
for the file at the given path.
Sourcepub fn identify_reader<R: Read + Seek>(
&self,
reader: R,
) -> Result<ArtifactId<H>, ArtifactIdError>
pub fn identify_reader<R: Read + Seek>( &self, reader: R, ) -> Result<ArtifactId<H>, ArtifactIdError>
Create an ArtifactId
for the given arbitrary seekable reader.
Sourcepub async fn identify_async_file(
&self,
file: &mut AsyncFile,
) -> Result<ArtifactId<H>, ArtifactIdError>
pub async fn identify_async_file( &self, file: &mut AsyncFile, ) -> Result<ArtifactId<H>, ArtifactIdError>
Create an ArtifactId
for the given file, asynchronously.
Sourcepub async fn identify_async_path(
&self,
path: &Path,
) -> Result<ArtifactId<H>, ArtifactIdError>
pub async fn identify_async_path( &self, path: &Path, ) -> Result<ArtifactId<H>, ArtifactIdError>
Create an ArtifactId
for the file at the given path, asynchronously.
Sourcepub async fn identify_async_reader<R: AsyncRead + AsyncSeek + Unpin>(
&self,
reader: R,
) -> Result<ArtifactId<H>, ArtifactIdError>
pub async fn identify_async_reader<R: AsyncRead + AsyncSeek + Unpin>( &self, reader: R, ) -> Result<ArtifactId<H>, ArtifactIdError>
Create an ArtifactId
for the given arbitrary seekable reader, asynchronously.
Sourcepub fn identify_manifest(&self, manifest: &InputManifest<H>) -> ArtifactId<H>
pub fn identify_manifest(&self, manifest: &InputManifest<H>) -> ArtifactId<H>
Create an ArtifactId
for the given InputManifest