av-stream-info-rust 0.13.2

Analyze a http/https internet address and display information if an audio or video stream has been found. All information is extracted from metainformation.
Documentation
use crate::StreamInfo;
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct StreamResult {
    url: String,
    info: Option<StreamInfo>,
    log: Vec<String>,
}

impl StreamResult {
    pub fn new(url: &str, info: Option<StreamInfo>, log: Vec<String>) -> Self {
        StreamResult {
            url: url.to_string(),
            info,
            log,
        }
    }

    pub fn url(&self) -> &str {
        &self.url
    }

    pub fn log(&self) -> &Vec<String> {
        &self.log
    }

    pub fn info(&self) -> &Option<StreamInfo> {
        &self.info
    }
}