Struct vaas::connection::Connection
source · pub struct Connection { /* private fields */ }Expand description
Active connection to the verdict server.
Implementations§
source§impl Connection
impl Connection
sourcepub async fn for_url(
&self,
url: &Url,
ct: &CancellationToken
) -> VResult<VaasVerdict>
pub async fn for_url( &self, url: &Url, ct: &CancellationToken ) -> VResult<VaasVerdict>
Request a verdict for a file behind a URL.
sourcepub async fn for_url_list(
&self,
url_list: &[Url],
ct: &CancellationToken
) -> Vec<VResult<VaasVerdict>>
pub async fn for_url_list( &self, url_list: &[Url], ct: &CancellationToken ) -> Vec<VResult<VaasVerdict>>
Request a verdict for files behind a list of URLs.
sourcepub async fn for_sha256(
&self,
sha256: &Sha256,
ct: &CancellationToken
) -> VResult<VaasVerdict>
pub async fn for_sha256( &self, sha256: &Sha256, ct: &CancellationToken ) -> VResult<VaasVerdict>
Request a verdict for a SHA256 file hash.
sourcepub async fn for_stream<S>(
&self,
stream: S,
content_length: usize,
ct: &CancellationToken
) -> VResult<VaasVerdict>
pub async fn for_stream<S>( &self, stream: S, content_length: usize, ct: &CancellationToken ) -> VResult<VaasVerdict>
Request a verdict for a SHA256 file hash.
sourcepub async fn for_sha256_list(
&self,
sha256_list: &[Sha256],
ct: &CancellationToken
) -> Vec<VResult<VaasVerdict>>
pub async fn for_sha256_list( &self, sha256_list: &[Sha256], ct: &CancellationToken ) -> Vec<VResult<VaasVerdict>>
Request verdicts for a list of SHA256 file hashes. The order of the output is the same order as the provided input.
sourcepub async fn for_file(
&self,
file: &Path,
ct: &CancellationToken
) -> VResult<VaasVerdict>
pub async fn for_file( &self, file: &Path, ct: &CancellationToken ) -> VResult<VaasVerdict>
Request a verdict for a file.
sourcepub async fn for_file_list(
&self,
files: &[PathBuf],
ct: &CancellationToken
) -> Vec<VResult<VaasVerdict>>
pub async fn for_file_list( &self, files: &[PathBuf], ct: &CancellationToken ) -> Vec<VResult<VaasVerdict>>
Request a verdict for a list of files. The order of the output is the same order as the provided input.
Trait Implementations§
source§impl Debug for Connection
impl Debug for Connection
Auto Trait Implementations§
impl Freeze for Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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