av_stream_info_rust/
external_check_result.rs

1use crate::StreamInfo;
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Serialize, Deserialize, Clone)]
5pub struct StreamResult {
6    url: String,
7    info: Option<StreamInfo>,
8    log: Vec<String>,
9}
10
11impl StreamResult {
12    pub fn new(url: &str, info: Option<StreamInfo>, log: Vec<String>) -> Self {
13        StreamResult {
14            url: url.to_string(),
15            info,
16            log,
17        }
18    }
19
20    pub fn url(&self) -> &str {
21        &self.url
22    }
23
24    pub fn log(&self) -> &Vec<String> {
25        &self.log
26    }
27
28    pub fn info(&self) -> &Option<StreamInfo> {
29        &self.info
30    }
31}