> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FnDownloadListener

> FnDownloadListener — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[filesystem](https://docs.kinetica.com/content/api/rust/filesystem/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/listeners.rs#L225-L234)&#x20;

<pre>`pub struct FnDownloadListener<F1, F2, F3>where    F1: Fn(Vec<OperationResult>) + Send + Sync,    F2: Fn(OperationResult) + Send + Sync,    F3: Fn(Vec<String>) + Send + Sync,{ /* private fields */ }`</pre>

A simple download listener that wraps callback functions.This provides a convenient way to create listeners using closures without implementing the full trait.

## Example

```rust theme={null}
use gpudb_api::filesystem::{FnDownloadListener, OperationResult};

let listener = FnDownloadListener::new(
    |results| println!("Multi-part complete: {} parts", results.len()),
    |result| println!("Part {} downloaded", result.file_name),
    |file_names| println!("Full files downloaded: {file_names:?}"),
);
```

## Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/listeners.rs#L236-L250)

### impl\<F1, F2, F3>[FnDownloadListener](https://docs.kinetica.com/content/api/rust/filesystem/struct.FnDownloadListener.md)\<F1, F2, F3>&#xA;where F1: [Fn](https://doc.rust-lang.org/1.98.1/core/ops/function/trait.Fn.html)([Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)>) + [Send](https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html) + [Sync](https://doc.rust-lang.org/1.98.1/core/marker/trait.Sync.html), F2: [Fn](https://doc.rust-lang.org/1.98.1/core/ops/function/trait.Fn.html)([OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)) + [Send](https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html) + [Sync](https://doc.rust-lang.org/1.98.1/core/marker/trait.Sync.html), F3: [Fn](https://doc.rust-lang.org/1.98.1/core/ops/function/trait.Fn.html)([Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>) + [Send](https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html) + [Sync](https://doc.rust-lang.org/1.98.1/core/marker/trait.Sync.html),

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/listeners.rs#L243-L249)
pub fn [new](#method.new)(on\_multi\_part\_complete: F1, on\_part: F2, on\_full: F3) -> Self

Creates a new function-based download listener.

## Trait Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/listeners.rs#L252-L269)

### impl\<F1, F2, F3>[FileDownloadListener](https://docs.kinetica.com/content/api/rust/filesystem/trait.FileDownloadListener.md) for [FnDownloadListener](https://docs.kinetica.com/content/api/rust/filesystem/struct.FnDownloadListener.md)\<F1, F2, F3>&#xA;where F1: [Fn](https://doc.rust-lang.org/1.98.1/core/ops/function/trait.Fn.html)([Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)>) + [Send](https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html) + [Sync](https://doc.rust-lang.org/1.98.1/core/marker/trait.Sync.html), F2: [Fn](https://doc.rust-lang.org/1.98.1/core/ops/function/trait.Fn.html)([OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)) + [Send](https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html) + [Sync](https://doc.rust-lang.org/1.98.1/core/marker/trait.Sync.html), F3: [Fn](https://doc.rust-lang.org/1.98.1/core/ops/function/trait.Fn.html)([Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>) + [Send](https://doc.rust-lang.org/1.98.1/core/marker/trait.Send.html) + [Sync](https://doc.rust-lang.org/1.98.1/core/marker/trait.Sync.html),

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/listeners.rs#L258-L260)
fn [on\_multi\_part\_download\_complete](https://docs.kinetica.com/content/api/rust/filesystem/trait.FileDownloadListener.md#tymethod.on_multi_part_download_complete)(\&self, results: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md)>)

Called when all parts of a multi-part download have been completed. [Read more](https://docs.kinetica.com/content/api/rust/filesystem/trait.FileDownloadListener.md#tymethod.on_multi_part_download_complete)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/listeners.rs#L262-L264)
fn [on\_part\_download](https://docs.kinetica.com/content/api/rust/filesystem/trait.FileDownloadListener.md#tymethod.on_part_download)(\&self, result: [OperationResult](https://docs.kinetica.com/content/api/rust/filesystem/struct.OperationResult.md))

Called whenever a single part of a multi-part download has been completed. [Read more](https://docs.kinetica.com/content/api/rust/filesystem/trait.FileDownloadListener.md#tymethod.on_part_download)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/listeners.rs#L266-L268)
fn [on\_full\_file\_download](https://docs.kinetica.com/content/api/rust/filesystem/trait.FileDownloadListener.md#tymethod.on_full_file_download)(\&self, file\_names: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>)

Called once per batch of whole files fetched in one request, with the KiFS names of those saved, when at least one was. A file skipped because it already existed locally and overwriting is off counts as saved. [Read more](https://docs.kinetica.com/content/api/rust/filesystem/trait.FileDownloadListener.md#tymethod.on_full_file_download)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.