use std::{path::Path, sync::Arc};
#[cfg(target_arch = "wasm32")]
use std::{future::Future, pin::Pin};
pub trait DroppedFile: std::fmt::Debug {
fn path(&self) -> &Path;
#[cfg(target_arch = "wasm32")]
fn bytes_async(&self) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, String>> + '_>>;
#[cfg(not(target_arch = "wasm32"))]
fn bytes(&self) -> Result<Vec<u8>, String>;
#[cfg(target_arch = "wasm32")]
fn web_file(&self) -> Option<&web_sys::File> {
None
}
}
#[cfg(not(all(target_arch = "wasm32", target_feature = "atomics")))]
pub type DroppedFileHandle = Arc<dyn DroppedFile + Send + Sync>;
#[cfg(all(target_arch = "wasm32", target_feature = "atomics"))]
pub type DroppedFileHandle = Arc<dyn DroppedFile>;