blob: 65801c2efeef8836b8ffb7d3098c6c421dd97c9e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// yt - A fully featured command line YouTube client
//
// Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This file is part of Yt.
//
// You should have received a copy of the License along with this program.
// If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
use crate::InfoJson;
pub mod dearrow;
pub trait PostProcessor: std::fmt::Debug + Send {
/// Process a [`InfoJson`] object and return the updated one.
///
/// # Errors
/// If the processing steps failed.
fn process(&self, info: InfoJson) -> Result<InfoJson, Error>;
/// The supported extractors for this post processor
fn extractors(&self) -> &'static [&'static str];
}
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("Failed to access a api: {0}")]
Get(#[from] reqwest::Error),
}
|