#![warn(clippy::all)]
#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
use {
bitflags::bitflags,
fidl::{
client::QueryResponseFut,
endpoints::{ControlHandle as _, Responder as _},
},
fuchsia_zircon_status as zx_status,
futures::future::{self, MaybeDone, TryFutureExt},
};
#[cfg(target_os = "fuchsia")]
use fuchsia_zircon as zx;
#[derive(Clone, Debug, PartialEq)]
pub struct LightGroups {
pub groups: Vec<fidl_fuchsia_settings::LightGroup>,
}
impl fidl::Persistable for LightGroups {}
mod internal {
use super::*;
unsafe impl fidl::encoding::TypeMarker for LightGroups {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
impl fidl::encoding::ValueTypeMarker for LightGroups {
type Borrowed<'a> = &'a Self;
fn borrow<'a>(
value: &'a <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::Encode<LightGroups> for &LightGroups {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<LightGroups>(offset);
fidl::encoding::Encode::<LightGroups>::encode(
(
<fidl::encoding::UnboundedVector<fidl_fuchsia_settings::LightGroup> as fidl::encoding::ValueTypeMarker>::borrow(&self.groups),
),
encoder, offset, _depth
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::UnboundedVector<fidl_fuchsia_settings::LightGroup>,
>,
> fidl::encoding::Encode<LightGroups> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<LightGroups>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self> for LightGroups {
#[inline(always)]
fn new_empty() -> Self {
Self {
groups: fidl::new_empty!(
fidl::encoding::UnboundedVector<fidl_fuchsia_settings::LightGroup>
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(
fidl::encoding::UnboundedVector<fidl_fuchsia_settings::LightGroup>,
&mut self.groups,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
}