| |
| |
| extern crate alloc; |
|
|
|
|
| #[allow(unused_imports, dead_code)] |
| pub mod bex { |
|
|
| #[allow(unused_imports, dead_code)] |
| pub mod wire { |
|
|
|
|
| #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] |
| pub const ENUM_MIN_MEDIA_KIND: i8 = 0; |
| #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] |
| pub const ENUM_MAX_MEDIA_KIND: i8 = 10; |
| #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] |
| #[allow(non_camel_case_types)] |
| pub const ENUM_VALUES_MEDIA_KIND: [MediaKind; 11] = [ |
| MediaKind::Movie, |
| MediaKind::Series, |
| MediaKind::Anime, |
| MediaKind::Short, |
| MediaKind::Special, |
| MediaKind::Documentary, |
| MediaKind::Music, |
| MediaKind::Podcast, |
| MediaKind::Book, |
| MediaKind::Live, |
| MediaKind::Unknown, |
| ]; |
|
|
| #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] |
| #[repr(transparent)] |
| pub struct MediaKind(pub i8); |
| #[allow(non_upper_case_globals)] |
| impl MediaKind { |
| pub const Movie: Self = Self(0); |
| pub const Series: Self = Self(1); |
| pub const Anime: Self = Self(2); |
| pub const Short: Self = Self(3); |
| pub const Special: Self = Self(4); |
| pub const Documentary: Self = Self(5); |
| pub const Music: Self = Self(6); |
| pub const Podcast: Self = Self(7); |
| pub const Book: Self = Self(8); |
| pub const Live: Self = Self(9); |
| pub const Unknown: Self = Self(10); |
|
|
| pub const ENUM_MIN: i8 = 0; |
| pub const ENUM_MAX: i8 = 10; |
| pub const ENUM_VALUES: &'static [Self] = &[ |
| Self::Movie, |
| Self::Series, |
| Self::Anime, |
| Self::Short, |
| Self::Special, |
| Self::Documentary, |
| Self::Music, |
| Self::Podcast, |
| Self::Book, |
| Self::Live, |
| Self::Unknown, |
| ]; |
| |
| pub fn variant_name(self) -> Option<&'static str> { |
| match self { |
| Self::Movie => Some("Movie"), |
| Self::Series => Some("Series"), |
| Self::Anime => Some("Anime"), |
| Self::Short => Some("Short"), |
| Self::Special => Some("Special"), |
| Self::Documentary => Some("Documentary"), |
| Self::Music => Some("Music"), |
| Self::Podcast => Some("Podcast"), |
| Self::Book => Some("Book"), |
| Self::Live => Some("Live"), |
| Self::Unknown => Some("Unknown"), |
| _ => None, |
| } |
| } |
| } |
| impl ::core::fmt::Debug for MediaKind { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { |
| if let Some(name) = self.variant_name() { |
| f.write_str(name) |
| } else { |
| f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0)) |
| } |
| } |
| } |
| impl<'a> ::flatbuffers::Follow<'a> for MediaKind { |
| type Inner = Self; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| let b = unsafe { ::flatbuffers::read_scalar_at::<i8>(buf, loc) }; |
| Self(b) |
| } |
| } |
|
|
| impl ::flatbuffers::Push for MediaKind { |
| type Output = MediaKind; |
| #[inline] |
| unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { |
| unsafe { ::flatbuffers::emplace_scalar::<i8>(dst, self.0) }; |
| } |
| } |
|
|
| impl ::flatbuffers::EndianScalar for MediaKind { |
| type Scalar = i8; |
| #[inline] |
| fn to_little_endian(self) -> i8 { |
| self.0.to_le() |
| } |
| #[inline] |
| #[allow(clippy::wrong_self_convention)] |
| fn from_little_endian(v: i8) -> Self { |
| let b = i8::from_le(v); |
| Self(b) |
| } |
| } |
|
|
| impl<'a> ::flatbuffers::Verifiable for MediaKind { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| i8::run_verifier(v, pos) |
| } |
| } |
|
|
| impl ::flatbuffers::SimpleToVerifyInSlice for MediaKind {} |
| #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] |
| pub const ENUM_MIN_STATUS: i8 = 0; |
| #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] |
| pub const ENUM_MAX_STATUS: i8 = 5; |
| #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] |
| #[allow(non_camel_case_types)] |
| pub const ENUM_VALUES_STATUS: [Status; 6] = [ |
| Status::Unknown, |
| Status::Upcoming, |
| Status::Ongoing, |
| Status::Completed, |
| Status::Cancelled, |
| Status::Paused, |
| ]; |
|
|
| #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] |
| #[repr(transparent)] |
| pub struct Status(pub i8); |
| #[allow(non_upper_case_globals)] |
| impl Status { |
| pub const Unknown: Self = Self(0); |
| pub const Upcoming: Self = Self(1); |
| pub const Ongoing: Self = Self(2); |
| pub const Completed: Self = Self(3); |
| pub const Cancelled: Self = Self(4); |
| pub const Paused: Self = Self(5); |
|
|
| pub const ENUM_MIN: i8 = 0; |
| pub const ENUM_MAX: i8 = 5; |
| pub const ENUM_VALUES: &'static [Self] = &[ |
| Self::Unknown, |
| Self::Upcoming, |
| Self::Ongoing, |
| Self::Completed, |
| Self::Cancelled, |
| Self::Paused, |
| ]; |
| |
| pub fn variant_name(self) -> Option<&'static str> { |
| match self { |
| Self::Unknown => Some("Unknown"), |
| Self::Upcoming => Some("Upcoming"), |
| Self::Ongoing => Some("Ongoing"), |
| Self::Completed => Some("Completed"), |
| Self::Cancelled => Some("Cancelled"), |
| Self::Paused => Some("Paused"), |
| _ => None, |
| } |
| } |
| } |
| impl ::core::fmt::Debug for Status { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { |
| if let Some(name) = self.variant_name() { |
| f.write_str(name) |
| } else { |
| f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0)) |
| } |
| } |
| } |
| impl<'a> ::flatbuffers::Follow<'a> for Status { |
| type Inner = Self; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| let b = unsafe { ::flatbuffers::read_scalar_at::<i8>(buf, loc) }; |
| Self(b) |
| } |
| } |
|
|
| impl ::flatbuffers::Push for Status { |
| type Output = Status; |
| #[inline] |
| unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { |
| unsafe { ::flatbuffers::emplace_scalar::<i8>(dst, self.0) }; |
| } |
| } |
|
|
| impl ::flatbuffers::EndianScalar for Status { |
| type Scalar = i8; |
| #[inline] |
| fn to_little_endian(self) -> i8 { |
| self.0.to_le() |
| } |
| #[inline] |
| #[allow(clippy::wrong_self_convention)] |
| fn from_little_endian(v: i8) -> Self { |
| let b = i8::from_le(v); |
| Self(b) |
| } |
| } |
|
|
| impl<'a> ::flatbuffers::Verifiable for Status { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| i8::run_verifier(v, pos) |
| } |
| } |
|
|
| impl ::flatbuffers::SimpleToVerifyInSlice for Status {} |
| #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] |
| pub const ENUM_MIN_STREAM_FORMAT: i8 = 0; |
| #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] |
| pub const ENUM_MAX_STREAM_FORMAT: i8 = 3; |
| #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] |
| #[allow(non_camel_case_types)] |
| pub const ENUM_VALUES_STREAM_FORMAT: [StreamFormat; 4] = [ |
| StreamFormat::Hls, |
| StreamFormat::Dash, |
| StreamFormat::Progressive, |
| StreamFormat::Unknown, |
| ]; |
|
|
| #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] |
| #[repr(transparent)] |
| pub struct StreamFormat(pub i8); |
| #[allow(non_upper_case_globals)] |
| impl StreamFormat { |
| pub const Hls: Self = Self(0); |
| pub const Dash: Self = Self(1); |
| pub const Progressive: Self = Self(2); |
| pub const Unknown: Self = Self(3); |
|
|
| pub const ENUM_MIN: i8 = 0; |
| pub const ENUM_MAX: i8 = 3; |
| pub const ENUM_VALUES: &'static [Self] = &[ |
| Self::Hls, |
| Self::Dash, |
| Self::Progressive, |
| Self::Unknown, |
| ]; |
| |
| pub fn variant_name(self) -> Option<&'static str> { |
| match self { |
| Self::Hls => Some("Hls"), |
| Self::Dash => Some("Dash"), |
| Self::Progressive => Some("Progressive"), |
| Self::Unknown => Some("Unknown"), |
| _ => None, |
| } |
| } |
| } |
| impl ::core::fmt::Debug for StreamFormat { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { |
| if let Some(name) = self.variant_name() { |
| f.write_str(name) |
| } else { |
| f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0)) |
| } |
| } |
| } |
| impl<'a> ::flatbuffers::Follow<'a> for StreamFormat { |
| type Inner = Self; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| let b = unsafe { ::flatbuffers::read_scalar_at::<i8>(buf, loc) }; |
| Self(b) |
| } |
| } |
|
|
| impl ::flatbuffers::Push for StreamFormat { |
| type Output = StreamFormat; |
| #[inline] |
| unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { |
| unsafe { ::flatbuffers::emplace_scalar::<i8>(dst, self.0) }; |
| } |
| } |
|
|
| impl ::flatbuffers::EndianScalar for StreamFormat { |
| type Scalar = i8; |
| #[inline] |
| fn to_little_endian(self) -> i8 { |
| self.0.to_le() |
| } |
| #[inline] |
| #[allow(clippy::wrong_self_convention)] |
| fn from_little_endian(v: i8) -> Self { |
| let b = i8::from_le(v); |
| Self(b) |
| } |
| } |
|
|
| impl<'a> ::flatbuffers::Verifiable for StreamFormat { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| i8::run_verifier(v, pos) |
| } |
| } |
|
|
| impl ::flatbuffers::SimpleToVerifyInSlice for StreamFormat {} |
| pub enum ImageOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct Image<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for Image<'a> { |
| type Inner = Image<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> Image<'a> { |
| pub const VT_URL: ::flatbuffers::VOffsetT = 4; |
| pub const VT_LAYOUT: ::flatbuffers::VOffsetT = 6; |
| pub const VT_WIDTH: ::flatbuffers::VOffsetT = 8; |
| pub const VT_HEIGHT: ::flatbuffers::VOffsetT = 10; |
| pub const VT_BLURHASH: ::flatbuffers::VOffsetT = 12; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| Image { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args ImageArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<Image<'bldr>> { |
| let mut builder = ImageBuilder::new(_fbb); |
| if let Some(x) = args.blurhash { builder.add_blurhash(x); } |
| builder.add_height(args.height); |
| builder.add_width(args.width); |
| if let Some(x) = args.layout { builder.add_layout(x); } |
| if let Some(x) = args.url { builder.add_url(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn url(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Image::VT_URL, None)} |
| } |
| #[inline] |
| pub fn layout(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Image::VT_LAYOUT, None)} |
| } |
| #[inline] |
| pub fn width(&self) -> u32 { |
| |
| |
| |
| unsafe { self._tab.get::<u32>(Image::VT_WIDTH, Some(0)).unwrap()} |
| } |
| #[inline] |
| pub fn height(&self) -> u32 { |
| |
| |
| |
| unsafe { self._tab.get::<u32>(Image::VT_HEIGHT, Some(0)).unwrap()} |
| } |
| #[inline] |
| pub fn blurhash(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Image::VT_BLURHASH, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for Image<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("url", Self::VT_URL, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("layout", Self::VT_LAYOUT, false)? |
| .visit_field::<u32>("width", Self::VT_WIDTH, false)? |
| .visit_field::<u32>("height", Self::VT_HEIGHT, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("blurhash", Self::VT_BLURHASH, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct ImageArgs<'a> { |
| pub url: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub layout: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub width: u32, |
| pub height: u32, |
| pub blurhash: Option<::flatbuffers::WIPOffset<&'a str>>, |
| } |
| impl<'a> Default for ImageArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| ImageArgs { |
| url: None, |
| layout: None, |
| width: 0, |
| height: 0, |
| blurhash: None, |
| } |
| } |
| } |
|
|
| pub struct ImageBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ImageBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_url(&mut self, url: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Image::VT_URL, url); |
| } |
| #[inline] |
| pub fn add_layout(&mut self, layout: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Image::VT_LAYOUT, layout); |
| } |
| #[inline] |
| pub fn add_width(&mut self, width: u32) { |
| self.fbb_.push_slot::<u32>(Image::VT_WIDTH, width, 0); |
| } |
| #[inline] |
| pub fn add_height(&mut self, height: u32) { |
| self.fbb_.push_slot::<u32>(Image::VT_HEIGHT, height, 0); |
| } |
| #[inline] |
| pub fn add_blurhash(&mut self, blurhash: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Image::VT_BLURHASH, blurhash); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ImageBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| ImageBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<Image<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for Image<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("Image"); |
| ds.field("url", &self.url()); |
| ds.field("layout", &self.layout()); |
| ds.field("width", &self.width()); |
| ds.field("height", &self.height()); |
| ds.field("blurhash", &self.blurhash()); |
| ds.finish() |
| } |
| } |
| pub enum ImageSetOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct ImageSet<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for ImageSet<'a> { |
| type Inner = ImageSet<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> ImageSet<'a> { |
| pub const VT_LOW: ::flatbuffers::VOffsetT = 4; |
| pub const VT_MEDIUM: ::flatbuffers::VOffsetT = 6; |
| pub const VT_HIGH: ::flatbuffers::VOffsetT = 8; |
| pub const VT_BACKDROP: ::flatbuffers::VOffsetT = 10; |
| pub const VT_LOGO: ::flatbuffers::VOffsetT = 12; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| ImageSet { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args ImageSetArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<ImageSet<'bldr>> { |
| let mut builder = ImageSetBuilder::new(_fbb); |
| if let Some(x) = args.logo { builder.add_logo(x); } |
| if let Some(x) = args.backdrop { builder.add_backdrop(x); } |
| if let Some(x) = args.high { builder.add_high(x); } |
| if let Some(x) = args.medium { builder.add_medium(x); } |
| if let Some(x) = args.low { builder.add_low(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn low(&self) -> Option<Image<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Image>>(ImageSet::VT_LOW, None)} |
| } |
| #[inline] |
| pub fn medium(&self) -> Option<Image<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Image>>(ImageSet::VT_MEDIUM, None)} |
| } |
| #[inline] |
| pub fn high(&self) -> Option<Image<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Image>>(ImageSet::VT_HIGH, None)} |
| } |
| #[inline] |
| pub fn backdrop(&self) -> Option<Image<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Image>>(ImageSet::VT_BACKDROP, None)} |
| } |
| #[inline] |
| pub fn logo(&self) -> Option<Image<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Image>>(ImageSet::VT_LOGO, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for ImageSet<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<Image>>("low", Self::VT_LOW, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<Image>>("medium", Self::VT_MEDIUM, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<Image>>("high", Self::VT_HIGH, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<Image>>("backdrop", Self::VT_BACKDROP, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<Image>>("logo", Self::VT_LOGO, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct ImageSetArgs<'a> { |
| pub low: Option<::flatbuffers::WIPOffset<Image<'a>>>, |
| pub medium: Option<::flatbuffers::WIPOffset<Image<'a>>>, |
| pub high: Option<::flatbuffers::WIPOffset<Image<'a>>>, |
| pub backdrop: Option<::flatbuffers::WIPOffset<Image<'a>>>, |
| pub logo: Option<::flatbuffers::WIPOffset<Image<'a>>>, |
| } |
| impl<'a> Default for ImageSetArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| ImageSetArgs { |
| low: None, |
| medium: None, |
| high: None, |
| backdrop: None, |
| logo: None, |
| } |
| } |
| } |
|
|
| pub struct ImageSetBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ImageSetBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_low(&mut self, low: ::flatbuffers::WIPOffset<Image<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Image>>(ImageSet::VT_LOW, low); |
| } |
| #[inline] |
| pub fn add_medium(&mut self, medium: ::flatbuffers::WIPOffset<Image<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Image>>(ImageSet::VT_MEDIUM, medium); |
| } |
| #[inline] |
| pub fn add_high(&mut self, high: ::flatbuffers::WIPOffset<Image<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Image>>(ImageSet::VT_HIGH, high); |
| } |
| #[inline] |
| pub fn add_backdrop(&mut self, backdrop: ::flatbuffers::WIPOffset<Image<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Image>>(ImageSet::VT_BACKDROP, backdrop); |
| } |
| #[inline] |
| pub fn add_logo(&mut self, logo: ::flatbuffers::WIPOffset<Image<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Image>>(ImageSet::VT_LOGO, logo); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ImageSetBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| ImageSetBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<ImageSet<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for ImageSet<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("ImageSet"); |
| ds.field("low", &self.low()); |
| ds.field("medium", &self.medium()); |
| ds.field("high", &self.high()); |
| ds.field("backdrop", &self.backdrop()); |
| ds.field("logo", &self.logo()); |
| ds.finish() |
| } |
| } |
| pub enum LinkedIdOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct LinkedId<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for LinkedId<'a> { |
| type Inner = LinkedId<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> LinkedId<'a> { |
| pub const VT_SOURCE: ::flatbuffers::VOffsetT = 4; |
| pub const VT_ID: ::flatbuffers::VOffsetT = 6; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| LinkedId { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args LinkedIdArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<LinkedId<'bldr>> { |
| let mut builder = LinkedIdBuilder::new(_fbb); |
| if let Some(x) = args.id { builder.add_id(x); } |
| if let Some(x) = args.source { builder.add_source(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn source(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(LinkedId::VT_SOURCE, None)} |
| } |
| #[inline] |
| pub fn id(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(LinkedId::VT_ID, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for LinkedId<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("source", Self::VT_SOURCE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct LinkedIdArgs<'a> { |
| pub source: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub id: Option<::flatbuffers::WIPOffset<&'a str>>, |
| } |
| impl<'a> Default for LinkedIdArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| LinkedIdArgs { |
| source: None, |
| id: None, |
| } |
| } |
| } |
|
|
| pub struct LinkedIdBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> LinkedIdBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_source(&mut self, source: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(LinkedId::VT_SOURCE, source); |
| } |
| #[inline] |
| pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(LinkedId::VT_ID, id); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> LinkedIdBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| LinkedIdBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<LinkedId<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for LinkedId<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("LinkedId"); |
| ds.field("source", &self.source()); |
| ds.field("id", &self.id()); |
| ds.finish() |
| } |
| } |
| pub enum AttrOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct Attr<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for Attr<'a> { |
| type Inner = Attr<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> Attr<'a> { |
| pub const VT_KEY: ::flatbuffers::VOffsetT = 4; |
| pub const VT_VALUE: ::flatbuffers::VOffsetT = 6; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| Attr { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args AttrArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<Attr<'bldr>> { |
| let mut builder = AttrBuilder::new(_fbb); |
| if let Some(x) = args.value { builder.add_value(x); } |
| if let Some(x) = args.key { builder.add_key(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn key(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Attr::VT_KEY, None)} |
| } |
| #[inline] |
| pub fn value(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Attr::VT_VALUE, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for Attr<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("key", Self::VT_KEY, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct AttrArgs<'a> { |
| pub key: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub value: Option<::flatbuffers::WIPOffset<&'a str>>, |
| } |
| impl<'a> Default for AttrArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| AttrArgs { |
| key: None, |
| value: None, |
| } |
| } |
| } |
|
|
| pub struct AttrBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> AttrBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Attr::VT_KEY, key); |
| } |
| #[inline] |
| pub fn add_value(&mut self, value: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Attr::VT_VALUE, value); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> AttrBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| AttrBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<Attr<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for Attr<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("Attr"); |
| ds.field("key", &self.key()); |
| ds.field("value", &self.value()); |
| ds.finish() |
| } |
| } |
| pub enum MediaCardOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct MediaCard<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for MediaCard<'a> { |
| type Inner = MediaCard<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> MediaCard<'a> { |
| pub const VT_ID: ::flatbuffers::VOffsetT = 4; |
| pub const VT_TITLE: ::flatbuffers::VOffsetT = 6; |
| pub const VT_KIND: ::flatbuffers::VOffsetT = 8; |
| pub const VT_IMAGES: ::flatbuffers::VOffsetT = 10; |
| pub const VT_ORIGINAL_TITLE: ::flatbuffers::VOffsetT = 12; |
| pub const VT_TAGLINE: ::flatbuffers::VOffsetT = 14; |
| pub const VT_YEAR: ::flatbuffers::VOffsetT = 16; |
| pub const VT_SCORE: ::flatbuffers::VOffsetT = 18; |
| pub const VT_GENRES: ::flatbuffers::VOffsetT = 20; |
| pub const VT_STATUS: ::flatbuffers::VOffsetT = 22; |
| pub const VT_CONTENT_RATING: ::flatbuffers::VOffsetT = 24; |
| pub const VT_URL: ::flatbuffers::VOffsetT = 26; |
| pub const VT_IDS: ::flatbuffers::VOffsetT = 28; |
| pub const VT_EXTRA: ::flatbuffers::VOffsetT = 30; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| MediaCard { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args MediaCardArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<MediaCard<'bldr>> { |
| let mut builder = MediaCardBuilder::new(_fbb); |
| if let Some(x) = args.extra { builder.add_extra(x); } |
| if let Some(x) = args.ids { builder.add_ids(x); } |
| if let Some(x) = args.url { builder.add_url(x); } |
| if let Some(x) = args.content_rating { builder.add_content_rating(x); } |
| if let Some(x) = args.genres { builder.add_genres(x); } |
| builder.add_score(args.score); |
| if let Some(x) = args.year { builder.add_year(x); } |
| if let Some(x) = args.tagline { builder.add_tagline(x); } |
| if let Some(x) = args.original_title { builder.add_original_title(x); } |
| if let Some(x) = args.images { builder.add_images(x); } |
| if let Some(x) = args.title { builder.add_title(x); } |
| if let Some(x) = args.id { builder.add_id(x); } |
| builder.add_status(args.status); |
| builder.add_kind(args.kind); |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn id(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaCard::VT_ID, None)} |
| } |
| #[inline] |
| pub fn title(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaCard::VT_TITLE, None)} |
| } |
| #[inline] |
| pub fn kind(&self) -> MediaKind { |
| |
| |
| |
| unsafe { self._tab.get::<MediaKind>(MediaCard::VT_KIND, Some(MediaKind::Movie)).unwrap()} |
| } |
| #[inline] |
| pub fn images(&self) -> Option<ImageSet<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<ImageSet>>(MediaCard::VT_IMAGES, None)} |
| } |
| #[inline] |
| pub fn original_title(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaCard::VT_ORIGINAL_TITLE, None)} |
| } |
| #[inline] |
| pub fn tagline(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaCard::VT_TAGLINE, None)} |
| } |
| #[inline] |
| pub fn year(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaCard::VT_YEAR, None)} |
| } |
| #[inline] |
| pub fn score(&self) -> u32 { |
| |
| |
| |
| unsafe { self._tab.get::<u32>(MediaCard::VT_SCORE, Some(0)).unwrap()} |
| } |
| #[inline] |
| pub fn genres(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>(MediaCard::VT_GENRES, None)} |
| } |
| #[inline] |
| pub fn status(&self) -> Status { |
| |
| |
| |
| unsafe { self._tab.get::<Status>(MediaCard::VT_STATUS, Some(Status::Unknown)).unwrap()} |
| } |
| #[inline] |
| pub fn content_rating(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaCard::VT_CONTENT_RATING, None)} |
| } |
| #[inline] |
| pub fn url(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaCard::VT_URL, None)} |
| } |
| #[inline] |
| pub fn ids(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<LinkedId<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<LinkedId>>>>(MediaCard::VT_IDS, None)} |
| } |
| #[inline] |
| pub fn extra(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr>>>>(MediaCard::VT_EXTRA, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for MediaCard<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, false)? |
| .visit_field::<MediaKind>("kind", Self::VT_KIND, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<ImageSet>>("images", Self::VT_IMAGES, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("original_title", Self::VT_ORIGINAL_TITLE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("tagline", Self::VT_TAGLINE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("year", Self::VT_YEAR, false)? |
| .visit_field::<u32>("score", Self::VT_SCORE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>>>("genres", Self::VT_GENRES, false)? |
| .visit_field::<Status>("status", Self::VT_STATUS, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("content_rating", Self::VT_CONTENT_RATING, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("url", Self::VT_URL, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<LinkedId>>>>("ids", Self::VT_IDS, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Attr>>>>("extra", Self::VT_EXTRA, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct MediaCardArgs<'a> { |
| pub id: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub title: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub kind: MediaKind, |
| pub images: Option<::flatbuffers::WIPOffset<ImageSet<'a>>>, |
| pub original_title: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub tagline: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub year: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub score: u32, |
| pub genres: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>, |
| pub status: Status, |
| pub content_rating: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub url: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub ids: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<LinkedId<'a>>>>>, |
| pub extra: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>>>, |
| } |
| impl<'a> Default for MediaCardArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| MediaCardArgs { |
| id: None, |
| title: None, |
| kind: MediaKind::Movie, |
| images: None, |
| original_title: None, |
| tagline: None, |
| year: None, |
| score: 0, |
| genres: None, |
| status: Status::Unknown, |
| content_rating: None, |
| url: None, |
| ids: None, |
| extra: None, |
| } |
| } |
| } |
|
|
| pub struct MediaCardBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> MediaCardBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCard::VT_ID, id); |
| } |
| #[inline] |
| pub fn add_title(&mut self, title: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCard::VT_TITLE, title); |
| } |
| #[inline] |
| pub fn add_kind(&mut self, kind: MediaKind) { |
| self.fbb_.push_slot::<MediaKind>(MediaCard::VT_KIND, kind, MediaKind::Movie); |
| } |
| #[inline] |
| pub fn add_images(&mut self, images: ::flatbuffers::WIPOffset<ImageSet<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<ImageSet>>(MediaCard::VT_IMAGES, images); |
| } |
| #[inline] |
| pub fn add_original_title(&mut self, original_title: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCard::VT_ORIGINAL_TITLE, original_title); |
| } |
| #[inline] |
| pub fn add_tagline(&mut self, tagline: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCard::VT_TAGLINE, tagline); |
| } |
| #[inline] |
| pub fn add_year(&mut self, year: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCard::VT_YEAR, year); |
| } |
| #[inline] |
| pub fn add_score(&mut self, score: u32) { |
| self.fbb_.push_slot::<u32>(MediaCard::VT_SCORE, score, 0); |
| } |
| #[inline] |
| pub fn add_genres(&mut self, genres: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<&'b str>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCard::VT_GENRES, genres); |
| } |
| #[inline] |
| pub fn add_status(&mut self, status: Status) { |
| self.fbb_.push_slot::<Status>(MediaCard::VT_STATUS, status, Status::Unknown); |
| } |
| #[inline] |
| pub fn add_content_rating(&mut self, content_rating: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCard::VT_CONTENT_RATING, content_rating); |
| } |
| #[inline] |
| pub fn add_url(&mut self, url: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCard::VT_URL, url); |
| } |
| #[inline] |
| pub fn add_ids(&mut self, ids: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<LinkedId<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCard::VT_IDS, ids); |
| } |
| #[inline] |
| pub fn add_extra(&mut self, extra: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Attr<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaCard::VT_EXTRA, extra); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> MediaCardBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| MediaCardBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<MediaCard<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for MediaCard<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("MediaCard"); |
| ds.field("id", &self.id()); |
| ds.field("title", &self.title()); |
| ds.field("kind", &self.kind()); |
| ds.field("images", &self.images()); |
| ds.field("original_title", &self.original_title()); |
| ds.field("tagline", &self.tagline()); |
| ds.field("year", &self.year()); |
| ds.field("score", &self.score()); |
| ds.field("genres", &self.genres()); |
| ds.field("status", &self.status()); |
| ds.field("content_rating", &self.content_rating()); |
| ds.field("url", &self.url()); |
| ds.field("ids", &self.ids()); |
| ds.field("extra", &self.extra()); |
| ds.finish() |
| } |
| } |
| pub enum CategoryLinkOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct CategoryLink<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for CategoryLink<'a> { |
| type Inner = CategoryLink<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> CategoryLink<'a> { |
| pub const VT_ID: ::flatbuffers::VOffsetT = 4; |
| pub const VT_TITLE: ::flatbuffers::VOffsetT = 6; |
| pub const VT_SUBTITLE: ::flatbuffers::VOffsetT = 8; |
| pub const VT_IMAGE: ::flatbuffers::VOffsetT = 10; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| CategoryLink { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args CategoryLinkArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<CategoryLink<'bldr>> { |
| let mut builder = CategoryLinkBuilder::new(_fbb); |
| if let Some(x) = args.image { builder.add_image(x); } |
| if let Some(x) = args.subtitle { builder.add_subtitle(x); } |
| if let Some(x) = args.title { builder.add_title(x); } |
| if let Some(x) = args.id { builder.add_id(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn id(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(CategoryLink::VT_ID, None)} |
| } |
| #[inline] |
| pub fn title(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(CategoryLink::VT_TITLE, None)} |
| } |
| #[inline] |
| pub fn subtitle(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(CategoryLink::VT_SUBTITLE, None)} |
| } |
| #[inline] |
| pub fn image(&self) -> Option<Image<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<Image>>(CategoryLink::VT_IMAGE, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for CategoryLink<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("subtitle", Self::VT_SUBTITLE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<Image>>("image", Self::VT_IMAGE, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct CategoryLinkArgs<'a> { |
| pub id: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub title: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub subtitle: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub image: Option<::flatbuffers::WIPOffset<Image<'a>>>, |
| } |
| impl<'a> Default for CategoryLinkArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| CategoryLinkArgs { |
| id: None, |
| title: None, |
| subtitle: None, |
| image: None, |
| } |
| } |
| } |
|
|
| pub struct CategoryLinkBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> CategoryLinkBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(CategoryLink::VT_ID, id); |
| } |
| #[inline] |
| pub fn add_title(&mut self, title: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(CategoryLink::VT_TITLE, title); |
| } |
| #[inline] |
| pub fn add_subtitle(&mut self, subtitle: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(CategoryLink::VT_SUBTITLE, subtitle); |
| } |
| #[inline] |
| pub fn add_image(&mut self, image: ::flatbuffers::WIPOffset<Image<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<Image>>(CategoryLink::VT_IMAGE, image); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> CategoryLinkBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| CategoryLinkBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<CategoryLink<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for CategoryLink<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("CategoryLink"); |
| ds.field("id", &self.id()); |
| ds.field("title", &self.title()); |
| ds.field("subtitle", &self.subtitle()); |
| ds.field("image", &self.image()); |
| ds.finish() |
| } |
| } |
| pub enum HomeSectionOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct HomeSection<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for HomeSection<'a> { |
| type Inner = HomeSection<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> HomeSection<'a> { |
| pub const VT_ID: ::flatbuffers::VOffsetT = 4; |
| pub const VT_TITLE: ::flatbuffers::VOffsetT = 6; |
| pub const VT_SUBTITLE: ::flatbuffers::VOffsetT = 8; |
| pub const VT_ITEMS: ::flatbuffers::VOffsetT = 10; |
| pub const VT_NEXT_PAGE: ::flatbuffers::VOffsetT = 12; |
| pub const VT_LAYOUT: ::flatbuffers::VOffsetT = 14; |
| pub const VT_SHOW_RANK: ::flatbuffers::VOffsetT = 16; |
| pub const VT_CATEGORIES: ::flatbuffers::VOffsetT = 18; |
| pub const VT_EXTRA: ::flatbuffers::VOffsetT = 20; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| HomeSection { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args HomeSectionArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<HomeSection<'bldr>> { |
| let mut builder = HomeSectionBuilder::new(_fbb); |
| if let Some(x) = args.extra { builder.add_extra(x); } |
| if let Some(x) = args.categories { builder.add_categories(x); } |
| if let Some(x) = args.layout { builder.add_layout(x); } |
| if let Some(x) = args.next_page { builder.add_next_page(x); } |
| if let Some(x) = args.items { builder.add_items(x); } |
| if let Some(x) = args.subtitle { builder.add_subtitle(x); } |
| if let Some(x) = args.title { builder.add_title(x); } |
| if let Some(x) = args.id { builder.add_id(x); } |
| builder.add_show_rank(args.show_rank); |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn id(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(HomeSection::VT_ID, None)} |
| } |
| #[inline] |
| pub fn title(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(HomeSection::VT_TITLE, None)} |
| } |
| #[inline] |
| pub fn subtitle(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(HomeSection::VT_SUBTITLE, None)} |
| } |
| #[inline] |
| pub fn items(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<MediaCard<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<MediaCard>>>>(HomeSection::VT_ITEMS, None)} |
| } |
| #[inline] |
| pub fn next_page(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(HomeSection::VT_NEXT_PAGE, None)} |
| } |
| #[inline] |
| pub fn layout(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(HomeSection::VT_LAYOUT, None)} |
| } |
| #[inline] |
| pub fn show_rank(&self) -> bool { |
| |
| |
| |
| unsafe { self._tab.get::<bool>(HomeSection::VT_SHOW_RANK, Some(false)).unwrap()} |
| } |
| #[inline] |
| pub fn categories(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<CategoryLink<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<CategoryLink>>>>(HomeSection::VT_CATEGORIES, None)} |
| } |
| #[inline] |
| pub fn extra(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr>>>>(HomeSection::VT_EXTRA, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for HomeSection<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("subtitle", Self::VT_SUBTITLE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<MediaCard>>>>("items", Self::VT_ITEMS, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("next_page", Self::VT_NEXT_PAGE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("layout", Self::VT_LAYOUT, false)? |
| .visit_field::<bool>("show_rank", Self::VT_SHOW_RANK, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<CategoryLink>>>>("categories", Self::VT_CATEGORIES, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Attr>>>>("extra", Self::VT_EXTRA, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct HomeSectionArgs<'a> { |
| pub id: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub title: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub subtitle: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub items: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<MediaCard<'a>>>>>, |
| pub next_page: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub layout: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub show_rank: bool, |
| pub categories: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<CategoryLink<'a>>>>>, |
| pub extra: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>>>, |
| } |
| impl<'a> Default for HomeSectionArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| HomeSectionArgs { |
| id: None, |
| title: None, |
| subtitle: None, |
| items: None, |
| next_page: None, |
| layout: None, |
| show_rank: false, |
| categories: None, |
| extra: None, |
| } |
| } |
| } |
|
|
| pub struct HomeSectionBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> HomeSectionBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(HomeSection::VT_ID, id); |
| } |
| #[inline] |
| pub fn add_title(&mut self, title: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(HomeSection::VT_TITLE, title); |
| } |
| #[inline] |
| pub fn add_subtitle(&mut self, subtitle: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(HomeSection::VT_SUBTITLE, subtitle); |
| } |
| #[inline] |
| pub fn add_items(&mut self, items: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<MediaCard<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(HomeSection::VT_ITEMS, items); |
| } |
| #[inline] |
| pub fn add_next_page(&mut self, next_page: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(HomeSection::VT_NEXT_PAGE, next_page); |
| } |
| #[inline] |
| pub fn add_layout(&mut self, layout: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(HomeSection::VT_LAYOUT, layout); |
| } |
| #[inline] |
| pub fn add_show_rank(&mut self, show_rank: bool) { |
| self.fbb_.push_slot::<bool>(HomeSection::VT_SHOW_RANK, show_rank, false); |
| } |
| #[inline] |
| pub fn add_categories(&mut self, categories: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<CategoryLink<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(HomeSection::VT_CATEGORIES, categories); |
| } |
| #[inline] |
| pub fn add_extra(&mut self, extra: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Attr<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(HomeSection::VT_EXTRA, extra); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> HomeSectionBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| HomeSectionBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<HomeSection<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for HomeSection<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("HomeSection"); |
| ds.field("id", &self.id()); |
| ds.field("title", &self.title()); |
| ds.field("subtitle", &self.subtitle()); |
| ds.field("items", &self.items()); |
| ds.field("next_page", &self.next_page()); |
| ds.field("layout", &self.layout()); |
| ds.field("show_rank", &self.show_rank()); |
| ds.field("categories", &self.categories()); |
| ds.field("extra", &self.extra()); |
| ds.finish() |
| } |
| } |
| pub enum PagedResultOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct PagedResult<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for PagedResult<'a> { |
| type Inner = PagedResult<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> PagedResult<'a> { |
| pub const VT_ITEMS: ::flatbuffers::VOffsetT = 4; |
| pub const VT_CATEGORIES: ::flatbuffers::VOffsetT = 6; |
| pub const VT_NEXT_PAGE: ::flatbuffers::VOffsetT = 8; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| PagedResult { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args PagedResultArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<PagedResult<'bldr>> { |
| let mut builder = PagedResultBuilder::new(_fbb); |
| if let Some(x) = args.next_page { builder.add_next_page(x); } |
| if let Some(x) = args.categories { builder.add_categories(x); } |
| if let Some(x) = args.items { builder.add_items(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn items(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<MediaCard<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<MediaCard>>>>(PagedResult::VT_ITEMS, None)} |
| } |
| #[inline] |
| pub fn categories(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<CategoryLink<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<CategoryLink>>>>(PagedResult::VT_CATEGORIES, None)} |
| } |
| #[inline] |
| pub fn next_page(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(PagedResult::VT_NEXT_PAGE, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for PagedResult<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<MediaCard>>>>("items", Self::VT_ITEMS, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<CategoryLink>>>>("categories", Self::VT_CATEGORIES, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("next_page", Self::VT_NEXT_PAGE, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct PagedResultArgs<'a> { |
| pub items: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<MediaCard<'a>>>>>, |
| pub categories: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<CategoryLink<'a>>>>>, |
| pub next_page: Option<::flatbuffers::WIPOffset<&'a str>>, |
| } |
| impl<'a> Default for PagedResultArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| PagedResultArgs { |
| items: None, |
| categories: None, |
| next_page: None, |
| } |
| } |
| } |
|
|
| pub struct PagedResultBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PagedResultBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_items(&mut self, items: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<MediaCard<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PagedResult::VT_ITEMS, items); |
| } |
| #[inline] |
| pub fn add_categories(&mut self, categories: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<CategoryLink<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PagedResult::VT_CATEGORIES, categories); |
| } |
| #[inline] |
| pub fn add_next_page(&mut self, next_page: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(PagedResult::VT_NEXT_PAGE, next_page); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PagedResultBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| PagedResultBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<PagedResult<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for PagedResult<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("PagedResult"); |
| ds.field("items", &self.items()); |
| ds.field("categories", &self.categories()); |
| ds.field("next_page", &self.next_page()); |
| ds.finish() |
| } |
| } |
| pub enum EpisodeOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct Episode<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for Episode<'a> { |
| type Inner = Episode<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> Episode<'a> { |
| pub const VT_ID: ::flatbuffers::VOffsetT = 4; |
| pub const VT_TITLE: ::flatbuffers::VOffsetT = 6; |
| pub const VT_NUMBER: ::flatbuffers::VOffsetT = 8; |
| pub const VT_SEASON: ::flatbuffers::VOffsetT = 10; |
| pub const VT_IMAGES: ::flatbuffers::VOffsetT = 12; |
| pub const VT_DESCRIPTION: ::flatbuffers::VOffsetT = 14; |
| pub const VT_RELEASED: ::flatbuffers::VOffsetT = 16; |
| pub const VT_SCORE: ::flatbuffers::VOffsetT = 18; |
| pub const VT_URL: ::flatbuffers::VOffsetT = 20; |
| pub const VT_TAGS: ::flatbuffers::VOffsetT = 22; |
| pub const VT_EXTRA: ::flatbuffers::VOffsetT = 24; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| Episode { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args EpisodeArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<Episode<'bldr>> { |
| let mut builder = EpisodeBuilder::new(_fbb); |
| builder.add_season(args.season); |
| builder.add_number(args.number); |
| if let Some(x) = args.extra { builder.add_extra(x); } |
| if let Some(x) = args.tags { builder.add_tags(x); } |
| if let Some(x) = args.url { builder.add_url(x); } |
| builder.add_score(args.score); |
| if let Some(x) = args.released { builder.add_released(x); } |
| if let Some(x) = args.description { builder.add_description(x); } |
| if let Some(x) = args.images { builder.add_images(x); } |
| if let Some(x) = args.title { builder.add_title(x); } |
| if let Some(x) = args.id { builder.add_id(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn id(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Episode::VT_ID, None)} |
| } |
| #[inline] |
| pub fn title(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Episode::VT_TITLE, None)} |
| } |
| #[inline] |
| pub fn number(&self) -> f64 { |
| |
| |
| |
| unsafe { self._tab.get::<f64>(Episode::VT_NUMBER, Some(0.0)).unwrap()} |
| } |
| #[inline] |
| pub fn season(&self) -> f64 { |
| |
| |
| |
| unsafe { self._tab.get::<f64>(Episode::VT_SEASON, Some(0.0)).unwrap()} |
| } |
| #[inline] |
| pub fn images(&self) -> Option<ImageSet<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<ImageSet>>(Episode::VT_IMAGES, None)} |
| } |
| #[inline] |
| pub fn description(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Episode::VT_DESCRIPTION, None)} |
| } |
| #[inline] |
| pub fn released(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Episode::VT_RELEASED, None)} |
| } |
| #[inline] |
| pub fn score(&self) -> u32 { |
| |
| |
| |
| unsafe { self._tab.get::<u32>(Episode::VT_SCORE, Some(0)).unwrap()} |
| } |
| #[inline] |
| pub fn url(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Episode::VT_URL, None)} |
| } |
| #[inline] |
| pub fn tags(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>(Episode::VT_TAGS, None)} |
| } |
| #[inline] |
| pub fn extra(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr>>>>(Episode::VT_EXTRA, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for Episode<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, false)? |
| .visit_field::<f64>("number", Self::VT_NUMBER, false)? |
| .visit_field::<f64>("season", Self::VT_SEASON, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<ImageSet>>("images", Self::VT_IMAGES, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("description", Self::VT_DESCRIPTION, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("released", Self::VT_RELEASED, false)? |
| .visit_field::<u32>("score", Self::VT_SCORE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("url", Self::VT_URL, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>>>("tags", Self::VT_TAGS, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Attr>>>>("extra", Self::VT_EXTRA, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct EpisodeArgs<'a> { |
| pub id: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub title: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub number: f64, |
| pub season: f64, |
| pub images: Option<::flatbuffers::WIPOffset<ImageSet<'a>>>, |
| pub description: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub released: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub score: u32, |
| pub url: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub tags: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>, |
| pub extra: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>>>, |
| } |
| impl<'a> Default for EpisodeArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| EpisodeArgs { |
| id: None, |
| title: None, |
| number: 0.0, |
| season: 0.0, |
| images: None, |
| description: None, |
| released: None, |
| score: 0, |
| url: None, |
| tags: None, |
| extra: None, |
| } |
| } |
| } |
|
|
| pub struct EpisodeBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> EpisodeBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Episode::VT_ID, id); |
| } |
| #[inline] |
| pub fn add_title(&mut self, title: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Episode::VT_TITLE, title); |
| } |
| #[inline] |
| pub fn add_number(&mut self, number: f64) { |
| self.fbb_.push_slot::<f64>(Episode::VT_NUMBER, number, 0.0); |
| } |
| #[inline] |
| pub fn add_season(&mut self, season: f64) { |
| self.fbb_.push_slot::<f64>(Episode::VT_SEASON, season, 0.0); |
| } |
| #[inline] |
| pub fn add_images(&mut self, images: ::flatbuffers::WIPOffset<ImageSet<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<ImageSet>>(Episode::VT_IMAGES, images); |
| } |
| #[inline] |
| pub fn add_description(&mut self, description: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Episode::VT_DESCRIPTION, description); |
| } |
| #[inline] |
| pub fn add_released(&mut self, released: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Episode::VT_RELEASED, released); |
| } |
| #[inline] |
| pub fn add_score(&mut self, score: u32) { |
| self.fbb_.push_slot::<u32>(Episode::VT_SCORE, score, 0); |
| } |
| #[inline] |
| pub fn add_url(&mut self, url: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Episode::VT_URL, url); |
| } |
| #[inline] |
| pub fn add_tags(&mut self, tags: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<&'b str>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Episode::VT_TAGS, tags); |
| } |
| #[inline] |
| pub fn add_extra(&mut self, extra: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Attr<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Episode::VT_EXTRA, extra); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> EpisodeBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| EpisodeBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<Episode<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for Episode<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("Episode"); |
| ds.field("id", &self.id()); |
| ds.field("title", &self.title()); |
| ds.field("number", &self.number()); |
| ds.field("season", &self.season()); |
| ds.field("images", &self.images()); |
| ds.field("description", &self.description()); |
| ds.field("released", &self.released()); |
| ds.field("score", &self.score()); |
| ds.field("url", &self.url()); |
| ds.field("tags", &self.tags()); |
| ds.field("extra", &self.extra()); |
| ds.finish() |
| } |
| } |
| pub enum SeasonOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct Season<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for Season<'a> { |
| type Inner = Season<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> Season<'a> { |
| pub const VT_ID: ::flatbuffers::VOffsetT = 4; |
| pub const VT_TITLE: ::flatbuffers::VOffsetT = 6; |
| pub const VT_NUMBER: ::flatbuffers::VOffsetT = 8; |
| pub const VT_YEAR: ::flatbuffers::VOffsetT = 10; |
| pub const VT_EPISODES: ::flatbuffers::VOffsetT = 12; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| Season { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args SeasonArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<Season<'bldr>> { |
| let mut builder = SeasonBuilder::new(_fbb); |
| builder.add_number(args.number); |
| if let Some(x) = args.episodes { builder.add_episodes(x); } |
| builder.add_year(args.year); |
| if let Some(x) = args.title { builder.add_title(x); } |
| if let Some(x) = args.id { builder.add_id(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn id(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Season::VT_ID, None)} |
| } |
| #[inline] |
| pub fn title(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Season::VT_TITLE, None)} |
| } |
| #[inline] |
| pub fn number(&self) -> f64 { |
| |
| |
| |
| unsafe { self._tab.get::<f64>(Season::VT_NUMBER, Some(0.0)).unwrap()} |
| } |
| #[inline] |
| pub fn year(&self) -> u32 { |
| |
| |
| |
| unsafe { self._tab.get::<u32>(Season::VT_YEAR, Some(0)).unwrap()} |
| } |
| #[inline] |
| pub fn episodes(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Episode<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Episode>>>>(Season::VT_EPISODES, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for Season<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, false)? |
| .visit_field::<f64>("number", Self::VT_NUMBER, false)? |
| .visit_field::<u32>("year", Self::VT_YEAR, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Episode>>>>("episodes", Self::VT_EPISODES, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct SeasonArgs<'a> { |
| pub id: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub title: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub number: f64, |
| pub year: u32, |
| pub episodes: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Episode<'a>>>>>, |
| } |
| impl<'a> Default for SeasonArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| SeasonArgs { |
| id: None, |
| title: None, |
| number: 0.0, |
| year: 0, |
| episodes: None, |
| } |
| } |
| } |
|
|
| pub struct SeasonBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SeasonBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Season::VT_ID, id); |
| } |
| #[inline] |
| pub fn add_title(&mut self, title: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Season::VT_TITLE, title); |
| } |
| #[inline] |
| pub fn add_number(&mut self, number: f64) { |
| self.fbb_.push_slot::<f64>(Season::VT_NUMBER, number, 0.0); |
| } |
| #[inline] |
| pub fn add_year(&mut self, year: u32) { |
| self.fbb_.push_slot::<u32>(Season::VT_YEAR, year, 0); |
| } |
| #[inline] |
| pub fn add_episodes(&mut self, episodes: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Episode<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Season::VT_EPISODES, episodes); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SeasonBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| SeasonBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<Season<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for Season<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("Season"); |
| ds.field("id", &self.id()); |
| ds.field("title", &self.title()); |
| ds.field("number", &self.number()); |
| ds.field("year", &self.year()); |
| ds.field("episodes", &self.episodes()); |
| ds.finish() |
| } |
| } |
| pub enum PersonOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct Person<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for Person<'a> { |
| type Inner = Person<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> Person<'a> { |
| pub const VT_ID: ::flatbuffers::VOffsetT = 4; |
| pub const VT_NAME: ::flatbuffers::VOffsetT = 6; |
| pub const VT_IMAGE: ::flatbuffers::VOffsetT = 8; |
| pub const VT_ROLE: ::flatbuffers::VOffsetT = 10; |
| pub const VT_URL: ::flatbuffers::VOffsetT = 12; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| Person { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args PersonArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<Person<'bldr>> { |
| let mut builder = PersonBuilder::new(_fbb); |
| if let Some(x) = args.url { builder.add_url(x); } |
| if let Some(x) = args.role { builder.add_role(x); } |
| if let Some(x) = args.image { builder.add_image(x); } |
| if let Some(x) = args.name { builder.add_name(x); } |
| if let Some(x) = args.id { builder.add_id(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn id(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Person::VT_ID, None)} |
| } |
| #[inline] |
| pub fn name(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Person::VT_NAME, None)} |
| } |
| #[inline] |
| pub fn image(&self) -> Option<ImageSet<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<ImageSet>>(Person::VT_IMAGE, None)} |
| } |
| #[inline] |
| pub fn role(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Person::VT_ROLE, None)} |
| } |
| #[inline] |
| pub fn url(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Person::VT_URL, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for Person<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<ImageSet>>("image", Self::VT_IMAGE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("role", Self::VT_ROLE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("url", Self::VT_URL, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct PersonArgs<'a> { |
| pub id: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub name: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub image: Option<::flatbuffers::WIPOffset<ImageSet<'a>>>, |
| pub role: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub url: Option<::flatbuffers::WIPOffset<&'a str>>, |
| } |
| impl<'a> Default for PersonArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| PersonArgs { |
| id: None, |
| name: None, |
| image: None, |
| role: None, |
| url: None, |
| } |
| } |
| } |
|
|
| pub struct PersonBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> PersonBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Person::VT_ID, id); |
| } |
| #[inline] |
| pub fn add_name(&mut self, name: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Person::VT_NAME, name); |
| } |
| #[inline] |
| pub fn add_image(&mut self, image: ::flatbuffers::WIPOffset<ImageSet<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<ImageSet>>(Person::VT_IMAGE, image); |
| } |
| #[inline] |
| pub fn add_role(&mut self, role: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Person::VT_ROLE, role); |
| } |
| #[inline] |
| pub fn add_url(&mut self, url: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Person::VT_URL, url); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> PersonBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| PersonBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<Person<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for Person<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("Person"); |
| ds.field("id", &self.id()); |
| ds.field("name", &self.name()); |
| ds.field("image", &self.image()); |
| ds.field("role", &self.role()); |
| ds.field("url", &self.url()); |
| ds.finish() |
| } |
| } |
| pub enum MediaInfoOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct MediaInfo<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for MediaInfo<'a> { |
| type Inner = MediaInfo<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> MediaInfo<'a> { |
| pub const VT_ID: ::flatbuffers::VOffsetT = 4; |
| pub const VT_TITLE: ::flatbuffers::VOffsetT = 6; |
| pub const VT_KIND: ::flatbuffers::VOffsetT = 8; |
| pub const VT_IMAGES: ::flatbuffers::VOffsetT = 10; |
| pub const VT_ORIGINAL_TITLE: ::flatbuffers::VOffsetT = 12; |
| pub const VT_DESCRIPTION: ::flatbuffers::VOffsetT = 14; |
| pub const VT_SCORE: ::flatbuffers::VOffsetT = 16; |
| pub const VT_SCORED_BY: ::flatbuffers::VOffsetT = 18; |
| pub const VT_YEAR: ::flatbuffers::VOffsetT = 20; |
| pub const VT_RELEASE_DATE: ::flatbuffers::VOffsetT = 22; |
| pub const VT_GENRES: ::flatbuffers::VOffsetT = 24; |
| pub const VT_TAGS: ::flatbuffers::VOffsetT = 26; |
| pub const VT_STATUS: ::flatbuffers::VOffsetT = 28; |
| pub const VT_CONTENT_RATING: ::flatbuffers::VOffsetT = 30; |
| pub const VT_SEASONS: ::flatbuffers::VOffsetT = 32; |
| pub const VT_CAST: ::flatbuffers::VOffsetT = 34; |
| pub const VT_CREW: ::flatbuffers::VOffsetT = 36; |
| pub const VT_RUNTIME_MINUTES: ::flatbuffers::VOffsetT = 38; |
| pub const VT_TRAILER_URL: ::flatbuffers::VOffsetT = 40; |
| pub const VT_IDS: ::flatbuffers::VOffsetT = 42; |
| pub const VT_STUDIO: ::flatbuffers::VOffsetT = 44; |
| pub const VT_COUNTRY: ::flatbuffers::VOffsetT = 46; |
| pub const VT_LANGUAGE: ::flatbuffers::VOffsetT = 48; |
| pub const VT_URL: ::flatbuffers::VOffsetT = 50; |
| pub const VT_EXTRA: ::flatbuffers::VOffsetT = 52; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| MediaInfo { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args MediaInfoArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<MediaInfo<'bldr>> { |
| let mut builder = MediaInfoBuilder::new(_fbb); |
| builder.add_scored_by(args.scored_by); |
| if let Some(x) = args.extra { builder.add_extra(x); } |
| if let Some(x) = args.url { builder.add_url(x); } |
| if let Some(x) = args.language { builder.add_language(x); } |
| if let Some(x) = args.country { builder.add_country(x); } |
| if let Some(x) = args.studio { builder.add_studio(x); } |
| if let Some(x) = args.ids { builder.add_ids(x); } |
| if let Some(x) = args.trailer_url { builder.add_trailer_url(x); } |
| builder.add_runtime_minutes(args.runtime_minutes); |
| if let Some(x) = args.crew { builder.add_crew(x); } |
| if let Some(x) = args.cast { builder.add_cast(x); } |
| if let Some(x) = args.seasons { builder.add_seasons(x); } |
| if let Some(x) = args.content_rating { builder.add_content_rating(x); } |
| if let Some(x) = args.tags { builder.add_tags(x); } |
| if let Some(x) = args.genres { builder.add_genres(x); } |
| if let Some(x) = args.release_date { builder.add_release_date(x); } |
| if let Some(x) = args.year { builder.add_year(x); } |
| builder.add_score(args.score); |
| if let Some(x) = args.description { builder.add_description(x); } |
| if let Some(x) = args.original_title { builder.add_original_title(x); } |
| if let Some(x) = args.images { builder.add_images(x); } |
| if let Some(x) = args.title { builder.add_title(x); } |
| if let Some(x) = args.id { builder.add_id(x); } |
| builder.add_status(args.status); |
| builder.add_kind(args.kind); |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn id(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaInfo::VT_ID, None)} |
| } |
| #[inline] |
| pub fn title(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaInfo::VT_TITLE, None)} |
| } |
| #[inline] |
| pub fn kind(&self) -> MediaKind { |
| |
| |
| |
| unsafe { self._tab.get::<MediaKind>(MediaInfo::VT_KIND, Some(MediaKind::Movie)).unwrap()} |
| } |
| #[inline] |
| pub fn images(&self) -> Option<ImageSet<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<ImageSet>>(MediaInfo::VT_IMAGES, None)} |
| } |
| #[inline] |
| pub fn original_title(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaInfo::VT_ORIGINAL_TITLE, None)} |
| } |
| #[inline] |
| pub fn description(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaInfo::VT_DESCRIPTION, None)} |
| } |
| #[inline] |
| pub fn score(&self) -> u32 { |
| |
| |
| |
| unsafe { self._tab.get::<u32>(MediaInfo::VT_SCORE, Some(0)).unwrap()} |
| } |
| #[inline] |
| pub fn scored_by(&self) -> u64 { |
| |
| |
| |
| unsafe { self._tab.get::<u64>(MediaInfo::VT_SCORED_BY, Some(0)).unwrap()} |
| } |
| #[inline] |
| pub fn year(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaInfo::VT_YEAR, None)} |
| } |
| #[inline] |
| pub fn release_date(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaInfo::VT_RELEASE_DATE, None)} |
| } |
| #[inline] |
| pub fn genres(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>(MediaInfo::VT_GENRES, None)} |
| } |
| #[inline] |
| pub fn tags(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>(MediaInfo::VT_TAGS, None)} |
| } |
| #[inline] |
| pub fn status(&self) -> Status { |
| |
| |
| |
| unsafe { self._tab.get::<Status>(MediaInfo::VT_STATUS, Some(Status::Unknown)).unwrap()} |
| } |
| #[inline] |
| pub fn content_rating(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaInfo::VT_CONTENT_RATING, None)} |
| } |
| #[inline] |
| pub fn seasons(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Season<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Season>>>>(MediaInfo::VT_SEASONS, None)} |
| } |
| #[inline] |
| pub fn cast(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Person<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Person>>>>(MediaInfo::VT_CAST, None)} |
| } |
| #[inline] |
| pub fn crew(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Person<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Person>>>>(MediaInfo::VT_CREW, None)} |
| } |
| #[inline] |
| pub fn runtime_minutes(&self) -> u32 { |
| |
| |
| |
| unsafe { self._tab.get::<u32>(MediaInfo::VT_RUNTIME_MINUTES, Some(0)).unwrap()} |
| } |
| #[inline] |
| pub fn trailer_url(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaInfo::VT_TRAILER_URL, None)} |
| } |
| #[inline] |
| pub fn ids(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<LinkedId<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<LinkedId>>>>(MediaInfo::VT_IDS, None)} |
| } |
| #[inline] |
| pub fn studio(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaInfo::VT_STUDIO, None)} |
| } |
| #[inline] |
| pub fn country(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaInfo::VT_COUNTRY, None)} |
| } |
| #[inline] |
| pub fn language(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaInfo::VT_LANGUAGE, None)} |
| } |
| #[inline] |
| pub fn url(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(MediaInfo::VT_URL, None)} |
| } |
| #[inline] |
| pub fn extra(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr>>>>(MediaInfo::VT_EXTRA, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for MediaInfo<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, false)? |
| .visit_field::<MediaKind>("kind", Self::VT_KIND, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<ImageSet>>("images", Self::VT_IMAGES, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("original_title", Self::VT_ORIGINAL_TITLE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("description", Self::VT_DESCRIPTION, false)? |
| .visit_field::<u32>("score", Self::VT_SCORE, false)? |
| .visit_field::<u64>("scored_by", Self::VT_SCORED_BY, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("year", Self::VT_YEAR, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("release_date", Self::VT_RELEASE_DATE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>>>("genres", Self::VT_GENRES, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<&'_ str>>>>("tags", Self::VT_TAGS, false)? |
| .visit_field::<Status>("status", Self::VT_STATUS, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("content_rating", Self::VT_CONTENT_RATING, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Season>>>>("seasons", Self::VT_SEASONS, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Person>>>>("cast", Self::VT_CAST, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Person>>>>("crew", Self::VT_CREW, false)? |
| .visit_field::<u32>("runtime_minutes", Self::VT_RUNTIME_MINUTES, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("trailer_url", Self::VT_TRAILER_URL, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<LinkedId>>>>("ids", Self::VT_IDS, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("studio", Self::VT_STUDIO, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("country", Self::VT_COUNTRY, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("language", Self::VT_LANGUAGE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("url", Self::VT_URL, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Attr>>>>("extra", Self::VT_EXTRA, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct MediaInfoArgs<'a> { |
| pub id: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub title: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub kind: MediaKind, |
| pub images: Option<::flatbuffers::WIPOffset<ImageSet<'a>>>, |
| pub original_title: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub description: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub score: u32, |
| pub scored_by: u64, |
| pub year: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub release_date: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub genres: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>, |
| pub tags: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<&'a str>>>>, |
| pub status: Status, |
| pub content_rating: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub seasons: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Season<'a>>>>>, |
| pub cast: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Person<'a>>>>>, |
| pub crew: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Person<'a>>>>>, |
| pub runtime_minutes: u32, |
| pub trailer_url: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub ids: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<LinkedId<'a>>>>>, |
| pub studio: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub country: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub language: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub url: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub extra: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>>>, |
| } |
| impl<'a> Default for MediaInfoArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| MediaInfoArgs { |
| id: None, |
| title: None, |
| kind: MediaKind::Movie, |
| images: None, |
| original_title: None, |
| description: None, |
| score: 0, |
| scored_by: 0, |
| year: None, |
| release_date: None, |
| genres: None, |
| tags: None, |
| status: Status::Unknown, |
| content_rating: None, |
| seasons: None, |
| cast: None, |
| crew: None, |
| runtime_minutes: 0, |
| trailer_url: None, |
| ids: None, |
| studio: None, |
| country: None, |
| language: None, |
| url: None, |
| extra: None, |
| } |
| } |
| } |
|
|
| pub struct MediaInfoBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> MediaInfoBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_ID, id); |
| } |
| #[inline] |
| pub fn add_title(&mut self, title: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_TITLE, title); |
| } |
| #[inline] |
| pub fn add_kind(&mut self, kind: MediaKind) { |
| self.fbb_.push_slot::<MediaKind>(MediaInfo::VT_KIND, kind, MediaKind::Movie); |
| } |
| #[inline] |
| pub fn add_images(&mut self, images: ::flatbuffers::WIPOffset<ImageSet<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<ImageSet>>(MediaInfo::VT_IMAGES, images); |
| } |
| #[inline] |
| pub fn add_original_title(&mut self, original_title: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_ORIGINAL_TITLE, original_title); |
| } |
| #[inline] |
| pub fn add_description(&mut self, description: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_DESCRIPTION, description); |
| } |
| #[inline] |
| pub fn add_score(&mut self, score: u32) { |
| self.fbb_.push_slot::<u32>(MediaInfo::VT_SCORE, score, 0); |
| } |
| #[inline] |
| pub fn add_scored_by(&mut self, scored_by: u64) { |
| self.fbb_.push_slot::<u64>(MediaInfo::VT_SCORED_BY, scored_by, 0); |
| } |
| #[inline] |
| pub fn add_year(&mut self, year: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_YEAR, year); |
| } |
| #[inline] |
| pub fn add_release_date(&mut self, release_date: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_RELEASE_DATE, release_date); |
| } |
| #[inline] |
| pub fn add_genres(&mut self, genres: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<&'b str>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_GENRES, genres); |
| } |
| #[inline] |
| pub fn add_tags(&mut self, tags: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<&'b str>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_TAGS, tags); |
| } |
| #[inline] |
| pub fn add_status(&mut self, status: Status) { |
| self.fbb_.push_slot::<Status>(MediaInfo::VT_STATUS, status, Status::Unknown); |
| } |
| #[inline] |
| pub fn add_content_rating(&mut self, content_rating: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_CONTENT_RATING, content_rating); |
| } |
| #[inline] |
| pub fn add_seasons(&mut self, seasons: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Season<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_SEASONS, seasons); |
| } |
| #[inline] |
| pub fn add_cast(&mut self, cast: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Person<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_CAST, cast); |
| } |
| #[inline] |
| pub fn add_crew(&mut self, crew: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Person<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_CREW, crew); |
| } |
| #[inline] |
| pub fn add_runtime_minutes(&mut self, runtime_minutes: u32) { |
| self.fbb_.push_slot::<u32>(MediaInfo::VT_RUNTIME_MINUTES, runtime_minutes, 0); |
| } |
| #[inline] |
| pub fn add_trailer_url(&mut self, trailer_url: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_TRAILER_URL, trailer_url); |
| } |
| #[inline] |
| pub fn add_ids(&mut self, ids: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<LinkedId<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_IDS, ids); |
| } |
| #[inline] |
| pub fn add_studio(&mut self, studio: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_STUDIO, studio); |
| } |
| #[inline] |
| pub fn add_country(&mut self, country: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_COUNTRY, country); |
| } |
| #[inline] |
| pub fn add_language(&mut self, language: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_LANGUAGE, language); |
| } |
| #[inline] |
| pub fn add_url(&mut self, url: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_URL, url); |
| } |
| #[inline] |
| pub fn add_extra(&mut self, extra: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Attr<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(MediaInfo::VT_EXTRA, extra); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> MediaInfoBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| MediaInfoBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<MediaInfo<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for MediaInfo<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("MediaInfo"); |
| ds.field("id", &self.id()); |
| ds.field("title", &self.title()); |
| ds.field("kind", &self.kind()); |
| ds.field("images", &self.images()); |
| ds.field("original_title", &self.original_title()); |
| ds.field("description", &self.description()); |
| ds.field("score", &self.score()); |
| ds.field("scored_by", &self.scored_by()); |
| ds.field("year", &self.year()); |
| ds.field("release_date", &self.release_date()); |
| ds.field("genres", &self.genres()); |
| ds.field("tags", &self.tags()); |
| ds.field("status", &self.status()); |
| ds.field("content_rating", &self.content_rating()); |
| ds.field("seasons", &self.seasons()); |
| ds.field("cast", &self.cast()); |
| ds.field("crew", &self.crew()); |
| ds.field("runtime_minutes", &self.runtime_minutes()); |
| ds.field("trailer_url", &self.trailer_url()); |
| ds.field("ids", &self.ids()); |
| ds.field("studio", &self.studio()); |
| ds.field("country", &self.country()); |
| ds.field("language", &self.language()); |
| ds.field("url", &self.url()); |
| ds.field("extra", &self.extra()); |
| ds.finish() |
| } |
| } |
| pub enum VideoResolutionOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct VideoResolution<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for VideoResolution<'a> { |
| type Inner = VideoResolution<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> VideoResolution<'a> { |
| pub const VT_WIDTH: ::flatbuffers::VOffsetT = 4; |
| pub const VT_HEIGHT: ::flatbuffers::VOffsetT = 6; |
| pub const VT_HDR: ::flatbuffers::VOffsetT = 8; |
| pub const VT_LABEL: ::flatbuffers::VOffsetT = 10; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| VideoResolution { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args VideoResolutionArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<VideoResolution<'bldr>> { |
| let mut builder = VideoResolutionBuilder::new(_fbb); |
| if let Some(x) = args.label { builder.add_label(x); } |
| builder.add_height(args.height); |
| builder.add_width(args.width); |
| builder.add_hdr(args.hdr); |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn width(&self) -> u32 { |
| |
| |
| |
| unsafe { self._tab.get::<u32>(VideoResolution::VT_WIDTH, Some(0)).unwrap()} |
| } |
| #[inline] |
| pub fn height(&self) -> u32 { |
| |
| |
| |
| unsafe { self._tab.get::<u32>(VideoResolution::VT_HEIGHT, Some(0)).unwrap()} |
| } |
| #[inline] |
| pub fn hdr(&self) -> bool { |
| |
| |
| |
| unsafe { self._tab.get::<bool>(VideoResolution::VT_HDR, Some(false)).unwrap()} |
| } |
| #[inline] |
| pub fn label(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(VideoResolution::VT_LABEL, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for VideoResolution<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<u32>("width", Self::VT_WIDTH, false)? |
| .visit_field::<u32>("height", Self::VT_HEIGHT, false)? |
| .visit_field::<bool>("hdr", Self::VT_HDR, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("label", Self::VT_LABEL, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct VideoResolutionArgs<'a> { |
| pub width: u32, |
| pub height: u32, |
| pub hdr: bool, |
| pub label: Option<::flatbuffers::WIPOffset<&'a str>>, |
| } |
| impl<'a> Default for VideoResolutionArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| VideoResolutionArgs { |
| width: 0, |
| height: 0, |
| hdr: false, |
| label: None, |
| } |
| } |
| } |
|
|
| pub struct VideoResolutionBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> VideoResolutionBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_width(&mut self, width: u32) { |
| self.fbb_.push_slot::<u32>(VideoResolution::VT_WIDTH, width, 0); |
| } |
| #[inline] |
| pub fn add_height(&mut self, height: u32) { |
| self.fbb_.push_slot::<u32>(VideoResolution::VT_HEIGHT, height, 0); |
| } |
| #[inline] |
| pub fn add_hdr(&mut self, hdr: bool) { |
| self.fbb_.push_slot::<bool>(VideoResolution::VT_HDR, hdr, false); |
| } |
| #[inline] |
| pub fn add_label(&mut self, label: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(VideoResolution::VT_LABEL, label); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> VideoResolutionBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| VideoResolutionBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<VideoResolution<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for VideoResolution<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("VideoResolution"); |
| ds.field("width", &self.width()); |
| ds.field("height", &self.height()); |
| ds.field("hdr", &self.hdr()); |
| ds.field("label", &self.label()); |
| ds.finish() |
| } |
| } |
| pub enum VideoTrackOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct VideoTrack<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for VideoTrack<'a> { |
| type Inner = VideoTrack<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> VideoTrack<'a> { |
| pub const VT_RESOLUTION: ::flatbuffers::VOffsetT = 4; |
| pub const VT_URL: ::flatbuffers::VOffsetT = 6; |
| pub const VT_MIME_TYPE: ::flatbuffers::VOffsetT = 8; |
| pub const VT_BITRATE: ::flatbuffers::VOffsetT = 10; |
| pub const VT_CODECS: ::flatbuffers::VOffsetT = 12; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| VideoTrack { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args VideoTrackArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<VideoTrack<'bldr>> { |
| let mut builder = VideoTrackBuilder::new(_fbb); |
| builder.add_bitrate(args.bitrate); |
| if let Some(x) = args.codecs { builder.add_codecs(x); } |
| if let Some(x) = args.mime_type { builder.add_mime_type(x); } |
| if let Some(x) = args.url { builder.add_url(x); } |
| if let Some(x) = args.resolution { builder.add_resolution(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn resolution(&self) -> Option<VideoResolution<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<VideoResolution>>(VideoTrack::VT_RESOLUTION, None)} |
| } |
| #[inline] |
| pub fn url(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(VideoTrack::VT_URL, None)} |
| } |
| #[inline] |
| pub fn mime_type(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(VideoTrack::VT_MIME_TYPE, None)} |
| } |
| #[inline] |
| pub fn bitrate(&self) -> u64 { |
| |
| |
| |
| unsafe { self._tab.get::<u64>(VideoTrack::VT_BITRATE, Some(0)).unwrap()} |
| } |
| #[inline] |
| pub fn codecs(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(VideoTrack::VT_CODECS, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for VideoTrack<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<VideoResolution>>("resolution", Self::VT_RESOLUTION, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("url", Self::VT_URL, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("mime_type", Self::VT_MIME_TYPE, false)? |
| .visit_field::<u64>("bitrate", Self::VT_BITRATE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("codecs", Self::VT_CODECS, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct VideoTrackArgs<'a> { |
| pub resolution: Option<::flatbuffers::WIPOffset<VideoResolution<'a>>>, |
| pub url: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub mime_type: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub bitrate: u64, |
| pub codecs: Option<::flatbuffers::WIPOffset<&'a str>>, |
| } |
| impl<'a> Default for VideoTrackArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| VideoTrackArgs { |
| resolution: None, |
| url: None, |
| mime_type: None, |
| bitrate: 0, |
| codecs: None, |
| } |
| } |
| } |
|
|
| pub struct VideoTrackBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> VideoTrackBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_resolution(&mut self, resolution: ::flatbuffers::WIPOffset<VideoResolution<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<VideoResolution>>(VideoTrack::VT_RESOLUTION, resolution); |
| } |
| #[inline] |
| pub fn add_url(&mut self, url: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(VideoTrack::VT_URL, url); |
| } |
| #[inline] |
| pub fn add_mime_type(&mut self, mime_type: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(VideoTrack::VT_MIME_TYPE, mime_type); |
| } |
| #[inline] |
| pub fn add_bitrate(&mut self, bitrate: u64) { |
| self.fbb_.push_slot::<u64>(VideoTrack::VT_BITRATE, bitrate, 0); |
| } |
| #[inline] |
| pub fn add_codecs(&mut self, codecs: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(VideoTrack::VT_CODECS, codecs); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> VideoTrackBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| VideoTrackBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<VideoTrack<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for VideoTrack<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("VideoTrack"); |
| ds.field("resolution", &self.resolution()); |
| ds.field("url", &self.url()); |
| ds.field("mime_type", &self.mime_type()); |
| ds.field("bitrate", &self.bitrate()); |
| ds.field("codecs", &self.codecs()); |
| ds.finish() |
| } |
| } |
| pub enum SubtitleTrackOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct SubtitleTrack<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for SubtitleTrack<'a> { |
| type Inner = SubtitleTrack<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> SubtitleTrack<'a> { |
| pub const VT_LABEL: ::flatbuffers::VOffsetT = 4; |
| pub const VT_URL: ::flatbuffers::VOffsetT = 6; |
| pub const VT_LANGUAGE: ::flatbuffers::VOffsetT = 8; |
| pub const VT_FORMAT: ::flatbuffers::VOffsetT = 10; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| SubtitleTrack { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args SubtitleTrackArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<SubtitleTrack<'bldr>> { |
| let mut builder = SubtitleTrackBuilder::new(_fbb); |
| if let Some(x) = args.format { builder.add_format(x); } |
| if let Some(x) = args.language { builder.add_language(x); } |
| if let Some(x) = args.url { builder.add_url(x); } |
| if let Some(x) = args.label { builder.add_label(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn label(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(SubtitleTrack::VT_LABEL, None)} |
| } |
| #[inline] |
| pub fn url(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(SubtitleTrack::VT_URL, None)} |
| } |
| #[inline] |
| pub fn language(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(SubtitleTrack::VT_LANGUAGE, None)} |
| } |
| #[inline] |
| pub fn format(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(SubtitleTrack::VT_FORMAT, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for SubtitleTrack<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("label", Self::VT_LABEL, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("url", Self::VT_URL, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("language", Self::VT_LANGUAGE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("format", Self::VT_FORMAT, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct SubtitleTrackArgs<'a> { |
| pub label: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub url: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub language: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub format: Option<::flatbuffers::WIPOffset<&'a str>>, |
| } |
| impl<'a> Default for SubtitleTrackArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| SubtitleTrackArgs { |
| label: None, |
| url: None, |
| language: None, |
| format: None, |
| } |
| } |
| } |
|
|
| pub struct SubtitleTrackBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SubtitleTrackBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_label(&mut self, label: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SubtitleTrack::VT_LABEL, label); |
| } |
| #[inline] |
| pub fn add_url(&mut self, url: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SubtitleTrack::VT_URL, url); |
| } |
| #[inline] |
| pub fn add_language(&mut self, language: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SubtitleTrack::VT_LANGUAGE, language); |
| } |
| #[inline] |
| pub fn add_format(&mut self, format: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(SubtitleTrack::VT_FORMAT, format); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SubtitleTrackBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| SubtitleTrackBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<SubtitleTrack<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for SubtitleTrack<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("SubtitleTrack"); |
| ds.field("label", &self.label()); |
| ds.field("url", &self.url()); |
| ds.field("language", &self.language()); |
| ds.field("format", &self.format()); |
| ds.finish() |
| } |
| } |
| pub enum ServerOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct Server<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for Server<'a> { |
| type Inner = Server<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> Server<'a> { |
| pub const VT_ID: ::flatbuffers::VOffsetT = 4; |
| pub const VT_LABEL: ::flatbuffers::VOffsetT = 6; |
| pub const VT_URL: ::flatbuffers::VOffsetT = 8; |
| pub const VT_PRIORITY: ::flatbuffers::VOffsetT = 10; |
| pub const VT_EXTRA: ::flatbuffers::VOffsetT = 12; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| Server { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args ServerArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<Server<'bldr>> { |
| let mut builder = ServerBuilder::new(_fbb); |
| if let Some(x) = args.extra { builder.add_extra(x); } |
| if let Some(x) = args.url { builder.add_url(x); } |
| if let Some(x) = args.label { builder.add_label(x); } |
| if let Some(x) = args.id { builder.add_id(x); } |
| builder.add_priority(args.priority); |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn id(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Server::VT_ID, None)} |
| } |
| #[inline] |
| pub fn label(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Server::VT_LABEL, None)} |
| } |
| #[inline] |
| pub fn url(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(Server::VT_URL, None)} |
| } |
| #[inline] |
| pub fn priority(&self) -> u8 { |
| |
| |
| |
| unsafe { self._tab.get::<u8>(Server::VT_PRIORITY, Some(0)).unwrap()} |
| } |
| #[inline] |
| pub fn extra(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr>>>>(Server::VT_EXTRA, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for Server<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("label", Self::VT_LABEL, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("url", Self::VT_URL, false)? |
| .visit_field::<u8>("priority", Self::VT_PRIORITY, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Attr>>>>("extra", Self::VT_EXTRA, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct ServerArgs<'a> { |
| pub id: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub label: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub url: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub priority: u8, |
| pub extra: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>>>, |
| } |
| impl<'a> Default for ServerArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| ServerArgs { |
| id: None, |
| label: None, |
| url: None, |
| priority: 0, |
| extra: None, |
| } |
| } |
| } |
|
|
| pub struct ServerBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ServerBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Server::VT_ID, id); |
| } |
| #[inline] |
| pub fn add_label(&mut self, label: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Server::VT_LABEL, label); |
| } |
| #[inline] |
| pub fn add_url(&mut self, url: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Server::VT_URL, url); |
| } |
| #[inline] |
| pub fn add_priority(&mut self, priority: u8) { |
| self.fbb_.push_slot::<u8>(Server::VT_PRIORITY, priority, 0); |
| } |
| #[inline] |
| pub fn add_extra(&mut self, extra: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Attr<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(Server::VT_EXTRA, extra); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ServerBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| ServerBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<Server<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for Server<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("Server"); |
| ds.field("id", &self.id()); |
| ds.field("label", &self.label()); |
| ds.field("url", &self.url()); |
| ds.field("priority", &self.priority()); |
| ds.field("extra", &self.extra()); |
| ds.finish() |
| } |
| } |
| pub enum StreamSourceOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct StreamSource<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for StreamSource<'a> { |
| type Inner = StreamSource<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> StreamSource<'a> { |
| pub const VT_ID: ::flatbuffers::VOffsetT = 4; |
| pub const VT_LABEL: ::flatbuffers::VOffsetT = 6; |
| pub const VT_FORMAT: ::flatbuffers::VOffsetT = 8; |
| pub const VT_MANIFEST_URL: ::flatbuffers::VOffsetT = 10; |
| pub const VT_VIDEOS: ::flatbuffers::VOffsetT = 12; |
| pub const VT_SUBTITLES: ::flatbuffers::VOffsetT = 14; |
| pub const VT_HEADERS: ::flatbuffers::VOffsetT = 16; |
| pub const VT_EXTRA: ::flatbuffers::VOffsetT = 18; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| StreamSource { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args StreamSourceArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<StreamSource<'bldr>> { |
| let mut builder = StreamSourceBuilder::new(_fbb); |
| if let Some(x) = args.extra { builder.add_extra(x); } |
| if let Some(x) = args.headers { builder.add_headers(x); } |
| if let Some(x) = args.subtitles { builder.add_subtitles(x); } |
| if let Some(x) = args.videos { builder.add_videos(x); } |
| if let Some(x) = args.manifest_url { builder.add_manifest_url(x); } |
| if let Some(x) = args.label { builder.add_label(x); } |
| if let Some(x) = args.id { builder.add_id(x); } |
| builder.add_format(args.format); |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn id(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(StreamSource::VT_ID, None)} |
| } |
| #[inline] |
| pub fn label(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(StreamSource::VT_LABEL, None)} |
| } |
| #[inline] |
| pub fn format(&self) -> StreamFormat { |
| |
| |
| |
| unsafe { self._tab.get::<StreamFormat>(StreamSource::VT_FORMAT, Some(StreamFormat::Hls)).unwrap()} |
| } |
| #[inline] |
| pub fn manifest_url(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(StreamSource::VT_MANIFEST_URL, None)} |
| } |
| #[inline] |
| pub fn videos(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<VideoTrack<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<VideoTrack>>>>(StreamSource::VT_VIDEOS, None)} |
| } |
| #[inline] |
| pub fn subtitles(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SubtitleTrack<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SubtitleTrack>>>>(StreamSource::VT_SUBTITLES, None)} |
| } |
| #[inline] |
| pub fn headers(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr>>>>(StreamSource::VT_HEADERS, None)} |
| } |
| #[inline] |
| pub fn extra(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr>>>>(StreamSource::VT_EXTRA, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for StreamSource<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("id", Self::VT_ID, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("label", Self::VT_LABEL, false)? |
| .visit_field::<StreamFormat>("format", Self::VT_FORMAT, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("manifest_url", Self::VT_MANIFEST_URL, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<VideoTrack>>>>("videos", Self::VT_VIDEOS, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<SubtitleTrack>>>>("subtitles", Self::VT_SUBTITLES, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Attr>>>>("headers", Self::VT_HEADERS, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Attr>>>>("extra", Self::VT_EXTRA, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct StreamSourceArgs<'a> { |
| pub id: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub label: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub format: StreamFormat, |
| pub manifest_url: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub videos: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<VideoTrack<'a>>>>>, |
| pub subtitles: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<SubtitleTrack<'a>>>>>, |
| pub headers: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>>>, |
| pub extra: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Attr<'a>>>>>, |
| } |
| impl<'a> Default for StreamSourceArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| StreamSourceArgs { |
| id: None, |
| label: None, |
| format: StreamFormat::Hls, |
| manifest_url: None, |
| videos: None, |
| subtitles: None, |
| headers: None, |
| extra: None, |
| } |
| } |
| } |
|
|
| pub struct StreamSourceBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> StreamSourceBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_id(&mut self, id: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(StreamSource::VT_ID, id); |
| } |
| #[inline] |
| pub fn add_label(&mut self, label: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(StreamSource::VT_LABEL, label); |
| } |
| #[inline] |
| pub fn add_format(&mut self, format: StreamFormat) { |
| self.fbb_.push_slot::<StreamFormat>(StreamSource::VT_FORMAT, format, StreamFormat::Hls); |
| } |
| #[inline] |
| pub fn add_manifest_url(&mut self, manifest_url: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(StreamSource::VT_MANIFEST_URL, manifest_url); |
| } |
| #[inline] |
| pub fn add_videos(&mut self, videos: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<VideoTrack<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(StreamSource::VT_VIDEOS, videos); |
| } |
| #[inline] |
| pub fn add_subtitles(&mut self, subtitles: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<SubtitleTrack<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(StreamSource::VT_SUBTITLES, subtitles); |
| } |
| #[inline] |
| pub fn add_headers(&mut self, headers: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Attr<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(StreamSource::VT_HEADERS, headers); |
| } |
| #[inline] |
| pub fn add_extra(&mut self, extra: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Attr<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(StreamSource::VT_EXTRA, extra); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> StreamSourceBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| StreamSourceBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<StreamSource<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for StreamSource<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("StreamSource"); |
| ds.field("id", &self.id()); |
| ds.field("label", &self.label()); |
| ds.field("format", &self.format()); |
| ds.field("manifest_url", &self.manifest_url()); |
| ds.field("videos", &self.videos()); |
| ds.field("subtitles", &self.subtitles()); |
| ds.field("headers", &self.headers()); |
| ds.field("extra", &self.extra()); |
| ds.finish() |
| } |
| } |
| pub enum HomeResultOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct HomeResult<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for HomeResult<'a> { |
| type Inner = HomeResult<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> HomeResult<'a> { |
| pub const VT_SECTIONS: ::flatbuffers::VOffsetT = 4; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| HomeResult { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args HomeResultArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<HomeResult<'bldr>> { |
| let mut builder = HomeResultBuilder::new(_fbb); |
| if let Some(x) = args.sections { builder.add_sections(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn sections(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<HomeSection<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<HomeSection>>>>(HomeResult::VT_SECTIONS, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for HomeResult<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<HomeSection>>>>("sections", Self::VT_SECTIONS, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct HomeResultArgs<'a> { |
| pub sections: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<HomeSection<'a>>>>>, |
| } |
| impl<'a> Default for HomeResultArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| HomeResultArgs { |
| sections: None, |
| } |
| } |
| } |
|
|
| pub struct HomeResultBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> HomeResultBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_sections(&mut self, sections: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<HomeSection<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(HomeResult::VT_SECTIONS, sections); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> HomeResultBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| HomeResultBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<HomeResult<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for HomeResult<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("HomeResult"); |
| ds.field("sections", &self.sections()); |
| ds.finish() |
| } |
| } |
| pub enum CategoryResultOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct CategoryResult<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for CategoryResult<'a> { |
| type Inner = CategoryResult<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> CategoryResult<'a> { |
| pub const VT_RESULT: ::flatbuffers::VOffsetT = 4; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| CategoryResult { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args CategoryResultArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<CategoryResult<'bldr>> { |
| let mut builder = CategoryResultBuilder::new(_fbb); |
| if let Some(x) = args.result { builder.add_result(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn result(&self) -> Option<PagedResult<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PagedResult>>(CategoryResult::VT_RESULT, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for CategoryResult<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<PagedResult>>("result", Self::VT_RESULT, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct CategoryResultArgs<'a> { |
| pub result: Option<::flatbuffers::WIPOffset<PagedResult<'a>>>, |
| } |
| impl<'a> Default for CategoryResultArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| CategoryResultArgs { |
| result: None, |
| } |
| } |
| } |
|
|
| pub struct CategoryResultBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> CategoryResultBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_result(&mut self, result: ::flatbuffers::WIPOffset<PagedResult<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PagedResult>>(CategoryResult::VT_RESULT, result); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> CategoryResultBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| CategoryResultBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<CategoryResult<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for CategoryResult<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("CategoryResult"); |
| ds.field("result", &self.result()); |
| ds.finish() |
| } |
| } |
| pub enum SearchResultOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct SearchResult<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for SearchResult<'a> { |
| type Inner = SearchResult<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> SearchResult<'a> { |
| pub const VT_RESULT: ::flatbuffers::VOffsetT = 4; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| SearchResult { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args SearchResultArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<SearchResult<'bldr>> { |
| let mut builder = SearchResultBuilder::new(_fbb); |
| if let Some(x) = args.result { builder.add_result(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn result(&self) -> Option<PagedResult<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<PagedResult>>(SearchResult::VT_RESULT, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for SearchResult<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<PagedResult>>("result", Self::VT_RESULT, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct SearchResultArgs<'a> { |
| pub result: Option<::flatbuffers::WIPOffset<PagedResult<'a>>>, |
| } |
| impl<'a> Default for SearchResultArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| SearchResultArgs { |
| result: None, |
| } |
| } |
| } |
|
|
| pub struct SearchResultBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> SearchResultBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_result(&mut self, result: ::flatbuffers::WIPOffset<PagedResult<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<PagedResult>>(SearchResult::VT_RESULT, result); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> SearchResultBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| SearchResultBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<SearchResult<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for SearchResult<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("SearchResult"); |
| ds.field("result", &self.result()); |
| ds.finish() |
| } |
| } |
| pub enum InfoResultOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct InfoResult<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for InfoResult<'a> { |
| type Inner = InfoResult<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> InfoResult<'a> { |
| pub const VT_INFO: ::flatbuffers::VOffsetT = 4; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| InfoResult { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args InfoResultArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<InfoResult<'bldr>> { |
| let mut builder = InfoResultBuilder::new(_fbb); |
| if let Some(x) = args.info { builder.add_info(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn info(&self) -> Option<MediaInfo<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<MediaInfo>>(InfoResult::VT_INFO, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for InfoResult<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<MediaInfo>>("info", Self::VT_INFO, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct InfoResultArgs<'a> { |
| pub info: Option<::flatbuffers::WIPOffset<MediaInfo<'a>>>, |
| } |
| impl<'a> Default for InfoResultArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| InfoResultArgs { |
| info: None, |
| } |
| } |
| } |
|
|
| pub struct InfoResultBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> InfoResultBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_info(&mut self, info: ::flatbuffers::WIPOffset<MediaInfo<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<MediaInfo>>(InfoResult::VT_INFO, info); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> InfoResultBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| InfoResultBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<InfoResult<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for InfoResult<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("InfoResult"); |
| ds.field("info", &self.info()); |
| ds.finish() |
| } |
| } |
| pub enum ServersResultOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct ServersResult<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for ServersResult<'a> { |
| type Inner = ServersResult<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> ServersResult<'a> { |
| pub const VT_SERVERS: ::flatbuffers::VOffsetT = 4; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| ServersResult { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args ServersResultArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<ServersResult<'bldr>> { |
| let mut builder = ServersResultBuilder::new(_fbb); |
| if let Some(x) = args.servers { builder.add_servers(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn servers(&self) -> Option<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Server<'a>>>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Server>>>>(ServersResult::VT_SERVERS, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for ServersResult<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<::flatbuffers::Vector<'_, ::flatbuffers::ForwardsUOffset<Server>>>>("servers", Self::VT_SERVERS, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct ServersResultArgs<'a> { |
| pub servers: Option<::flatbuffers::WIPOffset<::flatbuffers::Vector<'a, ::flatbuffers::ForwardsUOffset<Server<'a>>>>>, |
| } |
| impl<'a> Default for ServersResultArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| ServersResultArgs { |
| servers: None, |
| } |
| } |
| } |
|
|
| pub struct ServersResultBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ServersResultBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_servers(&mut self, servers: ::flatbuffers::WIPOffset<::flatbuffers::Vector<'b , ::flatbuffers::ForwardsUOffset<Server<'b >>>>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(ServersResult::VT_SERVERS, servers); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ServersResultBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| ServersResultBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<ServersResult<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for ServersResult<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("ServersResult"); |
| ds.field("servers", &self.servers()); |
| ds.finish() |
| } |
| } |
| pub enum StreamResultOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct StreamResult<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for StreamResult<'a> { |
| type Inner = StreamResult<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> StreamResult<'a> { |
| pub const VT_SOURCE: ::flatbuffers::VOffsetT = 4; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| StreamResult { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args StreamResultArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<StreamResult<'bldr>> { |
| let mut builder = StreamResultBuilder::new(_fbb); |
| if let Some(x) = args.source { builder.add_source(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn source(&self) -> Option<StreamSource<'a>> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<StreamSource>>(StreamResult::VT_SOURCE, None)} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for StreamResult<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<StreamSource>>("source", Self::VT_SOURCE, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct StreamResultArgs<'a> { |
| pub source: Option<::flatbuffers::WIPOffset<StreamSource<'a>>>, |
| } |
| impl<'a> Default for StreamResultArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| StreamResultArgs { |
| source: None, |
| } |
| } |
| } |
|
|
| pub struct StreamResultBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> StreamResultBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_source(&mut self, source: ::flatbuffers::WIPOffset<StreamSource<'b >>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<StreamSource>>(StreamResult::VT_SOURCE, source); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> StreamResultBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| StreamResultBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<StreamResult<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for StreamResult<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("StreamResult"); |
| ds.field("source", &self.source()); |
| ds.finish() |
| } |
| } |
| pub enum ErrorInfoOffset {} |
| #[derive(Copy, Clone, PartialEq)] |
|
|
| pub struct ErrorInfo<'a> { |
| pub _tab: ::flatbuffers::Table<'a>, |
| } |
|
|
| impl<'a> ::flatbuffers::Follow<'a> for ErrorInfo<'a> { |
| type Inner = ErrorInfo<'a>; |
| #[inline] |
| unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { |
| Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } } |
| } |
| } |
|
|
| impl<'a> ErrorInfo<'a> { |
| pub const VT_CODE: ::flatbuffers::VOffsetT = 4; |
| pub const VT_MESSAGE: ::flatbuffers::VOffsetT = 6; |
| pub const VT_PLUGIN_ID: ::flatbuffers::VOffsetT = 8; |
| pub const VT_REQUEST_ID: ::flatbuffers::VOffsetT = 10; |
|
|
| #[inline] |
| pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self { |
| ErrorInfo { _tab: table } |
| } |
| #[allow(unused_mut)] |
| pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>( |
| _fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>, |
| args: &'args ErrorInfoArgs<'args> |
| ) -> ::flatbuffers::WIPOffset<ErrorInfo<'bldr>> { |
| let mut builder = ErrorInfoBuilder::new(_fbb); |
| builder.add_request_id(args.request_id); |
| if let Some(x) = args.plugin_id { builder.add_plugin_id(x); } |
| if let Some(x) = args.message { builder.add_message(x); } |
| if let Some(x) = args.code { builder.add_code(x); } |
| builder.finish() |
| } |
|
|
|
|
| #[inline] |
| pub fn code(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(ErrorInfo::VT_CODE, None)} |
| } |
| #[inline] |
| pub fn message(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(ErrorInfo::VT_MESSAGE, None)} |
| } |
| #[inline] |
| pub fn plugin_id(&self) -> Option<&'a str> { |
| |
| |
| |
| unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(ErrorInfo::VT_PLUGIN_ID, None)} |
| } |
| #[inline] |
| pub fn request_id(&self) -> u64 { |
| |
| |
| |
| unsafe { self._tab.get::<u64>(ErrorInfo::VT_REQUEST_ID, Some(0)).unwrap()} |
| } |
| } |
|
|
| impl ::flatbuffers::Verifiable for ErrorInfo<'_> { |
| #[inline] |
| fn run_verifier( |
| v: &mut ::flatbuffers::Verifier, pos: usize |
| ) -> Result<(), ::flatbuffers::InvalidFlatbuffer> { |
| v.visit_table(pos)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("code", Self::VT_CODE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("message", Self::VT_MESSAGE, false)? |
| .visit_field::<::flatbuffers::ForwardsUOffset<&str>>("plugin_id", Self::VT_PLUGIN_ID, false)? |
| .visit_field::<u64>("request_id", Self::VT_REQUEST_ID, false)? |
| .finish(); |
| Ok(()) |
| } |
| } |
| pub struct ErrorInfoArgs<'a> { |
| pub code: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub message: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub plugin_id: Option<::flatbuffers::WIPOffset<&'a str>>, |
| pub request_id: u64, |
| } |
| impl<'a> Default for ErrorInfoArgs<'a> { |
| #[inline] |
| fn default() -> Self { |
| ErrorInfoArgs { |
| code: None, |
| message: None, |
| plugin_id: None, |
| request_id: 0, |
| } |
| } |
| } |
|
|
| pub struct ErrorInfoBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> { |
| fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>, |
| } |
| impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> ErrorInfoBuilder<'a, 'b, A> { |
| #[inline] |
| pub fn add_code(&mut self, code: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(ErrorInfo::VT_CODE, code); |
| } |
| #[inline] |
| pub fn add_message(&mut self, message: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(ErrorInfo::VT_MESSAGE, message); |
| } |
| #[inline] |
| pub fn add_plugin_id(&mut self, plugin_id: ::flatbuffers::WIPOffset<&'b str>) { |
| self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(ErrorInfo::VT_PLUGIN_ID, plugin_id); |
| } |
| #[inline] |
| pub fn add_request_id(&mut self, request_id: u64) { |
| self.fbb_.push_slot::<u64>(ErrorInfo::VT_REQUEST_ID, request_id, 0); |
| } |
| #[inline] |
| pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> ErrorInfoBuilder<'a, 'b, A> { |
| let start = _fbb.start_table(); |
| ErrorInfoBuilder { |
| fbb_: _fbb, |
| start_: start, |
| } |
| } |
| #[inline] |
| pub fn finish(self) -> ::flatbuffers::WIPOffset<ErrorInfo<'a>> { |
| let o = self.fbb_.end_table(self.start_); |
| ::flatbuffers::WIPOffset::new(o.value()) |
| } |
| } |
|
|
| impl ::core::fmt::Debug for ErrorInfo<'_> { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| let mut ds = f.debug_struct("ErrorInfo"); |
| ds.field("code", &self.code()); |
| ds.field("message", &self.message()); |
| ds.field("plugin_id", &self.plugin_id()); |
| ds.field("request_id", &self.request_id()); |
| ds.finish() |
| } |
| } |
| #[inline] |
| |
| |
| |
| |
| |
| |
| pub fn root_as_home_result(buf: &[u8]) -> Result<HomeResult<'_>, ::flatbuffers::InvalidFlatbuffer> { |
| ::flatbuffers::root::<HomeResult>(buf) |
| } |
| #[inline] |
| |
| |
| |
| |
| |
| |
| pub fn size_prefixed_root_as_home_result(buf: &[u8]) -> Result<HomeResult<'_>, ::flatbuffers::InvalidFlatbuffer> { |
| ::flatbuffers::size_prefixed_root::<HomeResult>(buf) |
| } |
| #[inline] |
| |
| |
| |
| |
| |
| |
| pub fn root_as_home_result_with_opts<'b, 'o>( |
| opts: &'o ::flatbuffers::VerifierOptions, |
| buf: &'b [u8], |
| ) -> Result<HomeResult<'b>, ::flatbuffers::InvalidFlatbuffer> { |
| ::flatbuffers::root_with_opts::<HomeResult<'b>>(opts, buf) |
| } |
| #[inline] |
| |
| |
| |
| |
| |
| |
| pub fn size_prefixed_root_as_home_result_with_opts<'b, 'o>( |
| opts: &'o ::flatbuffers::VerifierOptions, |
| buf: &'b [u8], |
| ) -> Result<HomeResult<'b>, ::flatbuffers::InvalidFlatbuffer> { |
| ::flatbuffers::size_prefixed_root_with_opts::<HomeResult<'b>>(opts, buf) |
| } |
| #[inline] |
| |
| |
| |
| pub unsafe fn root_as_home_result_unchecked(buf: &[u8]) -> HomeResult<'_> { |
| unsafe { ::flatbuffers::root_unchecked::<HomeResult>(buf) } |
| } |
| #[inline] |
| |
| |
| |
| pub unsafe fn size_prefixed_root_as_home_result_unchecked(buf: &[u8]) -> HomeResult<'_> { |
| unsafe { ::flatbuffers::size_prefixed_root_unchecked::<HomeResult>(buf) } |
| } |
| #[inline] |
| pub fn finish_home_result_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>( |
| fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, |
| root: ::flatbuffers::WIPOffset<HomeResult<'a>>) { |
| fbb.finish(root, None); |
| } |
|
|
| #[inline] |
| pub fn finish_size_prefixed_home_result_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, root: ::flatbuffers::WIPOffset<HomeResult<'a>>) { |
| fbb.finish_size_prefixed(root, None); |
| } |
| } |
| } |
|
|
|
|