Weave documentation
Rust referencedbrowser

dbrowser · commands::downloads

Source declarations, signatures and documentation for commands::downloads.

Source: sigil/weave/tools/dbrowser/src-tauri/src/commands/downloads.rs. SHA-256: 09bd9748fd7a9db5f4e602159cdae04f9c0da90611cc6adda94d5de780d46579.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

commands::downloads::DownloadOpenResult

Information returned to the frontend when a download is opened.

#[derive(Debug, Serialize)]
pub struct DownloadOpenResult {
pub path: String
}

Source line: 76.

commands::downloads::PrepareDownloadInput

Prepare a downloads-folder file: resolve destination, create the folder if needed, return the absolute path. Idempotent.

#[derive(Debug, Deserialize)]
pub struct PrepareDownloadInput {
pub filename: String,
/// Optional caller-supplied folder override (absolute path).

pub folder: Option<String>
}

Source line: 83.

commands::downloads::download_prepare

#[tauri::command]
pub fn download_prepare(input: PrepareDownloadInput) -> Result<String, String>;

Source line: 90.

commands::downloads::AppendChunkInput

Append a chunk of bytes to an in-progress download path.

#[derive(Debug, Deserialize)]
pub struct AppendChunkInput {
pub path: String,
pub data: Vec<u8>
}

Source line: 114.

commands::downloads::download_append_chunk

#[tauri::command]
pub fn download_append_chunk(input: AppendChunkInput) -> Result<(), String>;

Source line: 120.

commands::downloads::CancelDownloadInput

Cancel an in-progress download by deleting the partial file.

#[derive(Debug, Deserialize)]
pub struct CancelDownloadInput {
pub path: String
}

Source line: 132.

commands::downloads::download_cancel

#[tauri::command]
pub fn download_cancel(input: CancelDownloadInput) -> Result<(), String>;

Source line: 137.

commands::downloads::RevealDownloadInput

Reveal a completed download in Finder.

#[derive(Debug, Deserialize)]
pub struct RevealDownloadInput {
pub path: String
}

Source line: 146.

commands::downloads::download_reveal

#[tauri::command]
pub fn download_reveal(_app: AppHandle, input: RevealDownloadInput) -> Result<(), String>;

Source line: 151.

commands::downloads::OpenDownloadInput

Open a completed download with the system default application.

#[derive(Debug, Deserialize)]
pub struct OpenDownloadInput {
pub path: String
}

Source line: 177.

commands::downloads::download_open

#[tauri::command]
pub fn download_open(
    _app: AppHandle,
    input: OpenDownloadInput,
) -> Result<DownloadOpenResult, String>;

Source line: 182.

commands::downloads::download_default_folder

Resolve the default downloads directory for the user.

#[tauri::command]
pub fn download_default_folder() -> String;

Source line: 205.

On this page