refactor(instagram): organize files

This commit is contained in:
2025-09-19 18:26:36 +03:00
parent bae194b2bf
commit a7e5d43423
8 changed files with 354 additions and 162 deletions

27
src/error.rs Normal file
View File

@@ -0,0 +1,27 @@
use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("io error: {0}")]
Io(#[from] std::io::Error),
#[error("instaloader failed: {0}")]
InstaloaderFaileled(String),
#[error("no media found")]
NoMediaFound,
#[error("unknown media kind")]
UnknownMediaKind,
#[error("teloxide error: {0}")]
Teloxide(#[from] teloxide::RequestError),
#[error("join error: {0}")]
Join(#[from] tokio::task::JoinError),
#[error("other: {0}")]
Other(String),
}
pub type Result<T> = std::result::Result<T, Error>;