Skip to main content

nominal_api/conjure/errors/scout/video/api/
invalid_source_video.rs

1/// Attempting to segment a file that does not contain any video streams.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    PartialEq,
8    Eq,
9    PartialOrd,
10    Ord,
11    Hash
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct InvalidSourceVideo {
17    #[builder(into)]
18    #[serde(rename = "videoPath")]
19    video_path: String,
20}
21impl InvalidSourceVideo {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new(video_path: impl Into<String>) -> Self {
25        Self::builder().video_path(video_path).build()
26    }
27    #[inline]
28    pub fn video_path(&self) -> &str {
29        &*self.video_path
30    }
31}
32impl conjure_error::ErrorType for InvalidSourceVideo {
33    #[inline]
34    fn code() -> conjure_error::ErrorCode {
35        conjure_error::ErrorCode::InvalidArgument
36    }
37    #[inline]
38    fn name() -> &'static str {
39        "VideoSegmenter:InvalidSourceVideo"
40    }
41    #[inline]
42    fn safe_args() -> &'static [&'static str] {
43        &["videoPath"]
44    }
45}