#![warn(clippy::all)]
#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
use bitflags::bitflags;
use fidl::client::QueryResponseFut;
use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
use fidl::endpoints::{ControlHandle as _, Responder as _};
use futures::future::{self, MaybeDone, TryFutureExt};
use zx_status;
pub type QuaternionF = Vec4F;
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct Inset {
pub top: i32,
pub right: i32,
pub bottom: i32,
pub left: i32,
}
impl fidl::Persistable for Inset {}
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct InsetF {
pub top: f32,
pub right: f32,
pub bottom: f32,
pub left: f32,
}
impl fidl::Persistable for InsetF {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct Point {
pub x: i32,
pub y: i32,
}
impl fidl::Persistable for Point {}
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct Point3F {
pub x: f32,
pub y: f32,
pub z: f32,
}
impl fidl::Persistable for Point3F {}
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct PointF {
pub x: f32,
pub y: f32,
}
impl fidl::Persistable for PointF {}
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct RRectF {
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
pub top_left_radius_x: f32,
pub top_left_radius_y: f32,
pub top_right_radius_x: f32,
pub top_right_radius_y: f32,
pub bottom_left_radius_x: f32,
pub bottom_left_radius_y: f32,
pub bottom_right_radius_x: f32,
pub bottom_right_radius_y: f32,
}
impl fidl::Persistable for RRectF {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct RatioU32 {
pub numerator: u32,
pub denominator: u32,
}
impl fidl::Persistable for RatioU32 {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct RatioU64 {
pub numerator: u64,
pub denominator: u64,
}
impl fidl::Persistable for RatioU64 {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct Rect {
pub x: i32,
pub y: i32,
pub width: i32,
pub height: i32,
}
impl fidl::Persistable for Rect {}
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct RectF {
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
}
impl fidl::Persistable for RectF {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct RectU {
pub x: u32,
pub y: u32,
pub width: u32,
pub height: u32,
}
impl fidl::Persistable for RectU {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct Size {
pub width: i32,
pub height: i32,
}
impl fidl::Persistable for Size {}
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct SizeF {
pub width: f32,
pub height: f32,
}
impl fidl::Persistable for SizeF {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct SizeU {
pub width: u32,
pub height: u32,
}
impl fidl::Persistable for SizeU {}
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct Transform {
pub matrix: [f32; 16],
}
impl fidl::Persistable for Transform {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct Vec_ {
pub x: i32,
pub y: i32,
}
impl fidl::Persistable for Vec_ {}
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct Vec3F {
pub x: f32,
pub y: f32,
pub z: f32,
}
impl fidl::Persistable for Vec3F {}
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct Vec4F {
pub x: f32,
pub y: f32,
pub z: f32,
pub w: f32,
}
impl fidl::Persistable for Vec4F {}
#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
pub struct VecF {
pub x: f32,
pub y: f32,
}
impl fidl::Persistable for VecF {}
mod internal {
use super::*;
impl fidl::encoding::ValueTypeMarker for Inset {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Inset {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Inset, D> for &Inset {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Inset>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut Inset).write_unaligned((self as *const Inset).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<i32, D>,
T1: fidl::encoding::Encode<i32, D>,
T2: fidl::encoding::Encode<i32, D>,
T3: fidl::encoding::Encode<i32, D>,
> fidl::encoding::Encode<Inset, D> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Inset>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
self.3.encode(encoder, offset + 12, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Inset {
#[inline(always)]
fn new_empty() -> Self {
Self {
top: fidl::new_empty!(i32, D),
right: fidl::new_empty!(i32, D),
bottom: fidl::new_empty!(i32, D),
left: fidl::new_empty!(i32, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for InsetF {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for InsetF {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InsetF, D> for &InsetF {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InsetF>(offset);
fidl::encoding::Encode::<InsetF, D>::encode(
(
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.top),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.right),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.bottom),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.left),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<f32, D>,
T1: fidl::encoding::Encode<f32, D>,
T2: fidl::encoding::Encode<f32, D>,
T3: fidl::encoding::Encode<f32, D>,
> fidl::encoding::Encode<InsetF, D> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InsetF>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
self.3.encode(encoder, offset + 12, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InsetF {
#[inline(always)]
fn new_empty() -> Self {
Self {
top: fidl::new_empty!(f32, D),
right: fidl::new_empty!(f32, D),
bottom: fidl::new_empty!(f32, D),
left: fidl::new_empty!(f32, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(f32, D, &mut self.top, decoder, offset + 0, _depth)?;
fidl::decode!(f32, D, &mut self.right, decoder, offset + 4, _depth)?;
fidl::decode!(f32, D, &mut self.bottom, decoder, offset + 8, _depth)?;
fidl::decode!(f32, D, &mut self.left, decoder, offset + 12, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Point {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Point {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Point, D> for &Point {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Point>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut Point).write_unaligned((self as *const Point).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<i32, D>,
T1: fidl::encoding::Encode<i32, D>,
> fidl::encoding::Encode<Point, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Point>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Point {
#[inline(always)]
fn new_empty() -> Self {
Self { x: fidl::new_empty!(i32, D), y: fidl::new_empty!(i32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Point3F {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Point3F {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
12
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Point3F, D> for &Point3F {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Point3F>(offset);
fidl::encoding::Encode::<Point3F, D>::encode(
(
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.z),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<f32, D>,
T1: fidl::encoding::Encode<f32, D>,
T2: fidl::encoding::Encode<f32, D>,
> fidl::encoding::Encode<Point3F, D> for (T0, T1, T2)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Point3F>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Point3F {
#[inline(always)]
fn new_empty() -> Self {
Self {
x: fidl::new_empty!(f32, D),
y: fidl::new_empty!(f32, D),
z: fidl::new_empty!(f32, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
fidl::decode!(f32, D, &mut self.z, decoder, offset + 8, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for PointF {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for PointF {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PointF, D> for &PointF {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PointF>(offset);
fidl::encoding::Encode::<PointF, D>::encode(
(
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<f32, D>,
T1: fidl::encoding::Encode<f32, D>,
> fidl::encoding::Encode<PointF, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PointF>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PointF {
#[inline(always)]
fn new_empty() -> Self {
Self { x: fidl::new_empty!(f32, D), y: fidl::new_empty!(f32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for RRectF {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for RRectF {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
48
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RRectF, D> for &RRectF {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RRectF>(offset);
fidl::encoding::Encode::<RRectF, D>::encode(
(
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.width),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.height),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.top_left_radius_x),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.top_left_radius_y),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.top_right_radius_x),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.top_right_radius_y),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.bottom_left_radius_x),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.bottom_left_radius_y),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.bottom_right_radius_x),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.bottom_right_radius_y),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<f32, D>,
T1: fidl::encoding::Encode<f32, D>,
T2: fidl::encoding::Encode<f32, D>,
T3: fidl::encoding::Encode<f32, D>,
T4: fidl::encoding::Encode<f32, D>,
T5: fidl::encoding::Encode<f32, D>,
T6: fidl::encoding::Encode<f32, D>,
T7: fidl::encoding::Encode<f32, D>,
T8: fidl::encoding::Encode<f32, D>,
T9: fidl::encoding::Encode<f32, D>,
T10: fidl::encoding::Encode<f32, D>,
T11: fidl::encoding::Encode<f32, D>,
> fidl::encoding::Encode<RRectF, D> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RRectF>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
self.3.encode(encoder, offset + 12, depth)?;
self.4.encode(encoder, offset + 16, depth)?;
self.5.encode(encoder, offset + 20, depth)?;
self.6.encode(encoder, offset + 24, depth)?;
self.7.encode(encoder, offset + 28, depth)?;
self.8.encode(encoder, offset + 32, depth)?;
self.9.encode(encoder, offset + 36, depth)?;
self.10.encode(encoder, offset + 40, depth)?;
self.11.encode(encoder, offset + 44, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RRectF {
#[inline(always)]
fn new_empty() -> Self {
Self {
x: fidl::new_empty!(f32, D),
y: fidl::new_empty!(f32, D),
width: fidl::new_empty!(f32, D),
height: fidl::new_empty!(f32, D),
top_left_radius_x: fidl::new_empty!(f32, D),
top_left_radius_y: fidl::new_empty!(f32, D),
top_right_radius_x: fidl::new_empty!(f32, D),
top_right_radius_y: fidl::new_empty!(f32, D),
bottom_left_radius_x: fidl::new_empty!(f32, D),
bottom_left_radius_y: fidl::new_empty!(f32, D),
bottom_right_radius_x: fidl::new_empty!(f32, D),
bottom_right_radius_y: fidl::new_empty!(f32, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
fidl::decode!(f32, D, &mut self.width, decoder, offset + 8, _depth)?;
fidl::decode!(f32, D, &mut self.height, decoder, offset + 12, _depth)?;
fidl::decode!(f32, D, &mut self.top_left_radius_x, decoder, offset + 16, _depth)?;
fidl::decode!(f32, D, &mut self.top_left_radius_y, decoder, offset + 20, _depth)?;
fidl::decode!(f32, D, &mut self.top_right_radius_x, decoder, offset + 24, _depth)?;
fidl::decode!(f32, D, &mut self.top_right_radius_y, decoder, offset + 28, _depth)?;
fidl::decode!(f32, D, &mut self.bottom_left_radius_x, decoder, offset + 32, _depth)?;
fidl::decode!(f32, D, &mut self.bottom_left_radius_y, decoder, offset + 36, _depth)?;
fidl::decode!(f32, D, &mut self.bottom_right_radius_x, decoder, offset + 40, _depth)?;
fidl::decode!(f32, D, &mut self.bottom_right_radius_y, decoder, offset + 44, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for RatioU32 {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for RatioU32 {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RatioU32, D> for &RatioU32 {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RatioU32>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut RatioU32).write_unaligned((self as *const RatioU32).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u32, D>,
T1: fidl::encoding::Encode<u32, D>,
> fidl::encoding::Encode<RatioU32, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RatioU32>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RatioU32 {
#[inline(always)]
fn new_empty() -> Self {
Self { numerator: fidl::new_empty!(u32, D), denominator: fidl::new_empty!(u32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for RatioU64 {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for RatioU64 {
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
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RatioU64, D> for &RatioU64 {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RatioU64>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut RatioU64).write_unaligned((self as *const RatioU64).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u64, D>,
T1: fidl::encoding::Encode<u64, D>,
> fidl::encoding::Encode<RatioU64, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RatioU64>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 8, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RatioU64 {
#[inline(always)]
fn new_empty() -> Self {
Self { numerator: fidl::new_empty!(u64, D), denominator: fidl::new_empty!(u64, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Rect {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Rect {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Rect, D> for &Rect {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Rect>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut Rect).write_unaligned((self as *const Rect).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<i32, D>,
T1: fidl::encoding::Encode<i32, D>,
T2: fidl::encoding::Encode<i32, D>,
T3: fidl::encoding::Encode<i32, D>,
> fidl::encoding::Encode<Rect, D> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Rect>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
self.3.encode(encoder, offset + 12, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Rect {
#[inline(always)]
fn new_empty() -> Self {
Self {
x: fidl::new_empty!(i32, D),
y: fidl::new_empty!(i32, D),
width: fidl::new_empty!(i32, D),
height: fidl::new_empty!(i32, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for RectF {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for RectF {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RectF, D> for &RectF {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RectF>(offset);
fidl::encoding::Encode::<RectF, D>::encode(
(
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.width),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.height),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<f32, D>,
T1: fidl::encoding::Encode<f32, D>,
T2: fidl::encoding::Encode<f32, D>,
T3: fidl::encoding::Encode<f32, D>,
> fidl::encoding::Encode<RectF, D> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RectF>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
self.3.encode(encoder, offset + 12, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RectF {
#[inline(always)]
fn new_empty() -> Self {
Self {
x: fidl::new_empty!(f32, D),
y: fidl::new_empty!(f32, D),
width: fidl::new_empty!(f32, D),
height: fidl::new_empty!(f32, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
fidl::decode!(f32, D, &mut self.width, decoder, offset + 8, _depth)?;
fidl::decode!(f32, D, &mut self.height, decoder, offset + 12, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for RectU {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for RectU {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RectU, D> for &RectU {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RectU>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut RectU).write_unaligned((self as *const RectU).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u32, D>,
T1: fidl::encoding::Encode<u32, D>,
T2: fidl::encoding::Encode<u32, D>,
T3: fidl::encoding::Encode<u32, D>,
> fidl::encoding::Encode<RectU, D> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RectU>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
self.3.encode(encoder, offset + 12, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RectU {
#[inline(always)]
fn new_empty() -> Self {
Self {
x: fidl::new_empty!(u32, D),
y: fidl::new_empty!(u32, D),
width: fidl::new_empty!(u32, D),
height: fidl::new_empty!(u32, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Size {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Size {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size, D> for &Size {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Size>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut Size).write_unaligned((self as *const Size).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<i32, D>,
T1: fidl::encoding::Encode<i32, D>,
> fidl::encoding::Encode<Size, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Size>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size {
#[inline(always)]
fn new_empty() -> Self {
Self { width: fidl::new_empty!(i32, D), height: fidl::new_empty!(i32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for SizeF {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for SizeF {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SizeF, D> for &SizeF {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SizeF>(offset);
fidl::encoding::Encode::<SizeF, D>::encode(
(
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.width),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.height),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<f32, D>,
T1: fidl::encoding::Encode<f32, D>,
> fidl::encoding::Encode<SizeF, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SizeF>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SizeF {
#[inline(always)]
fn new_empty() -> Self {
Self { width: fidl::new_empty!(f32, D), height: fidl::new_empty!(f32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(f32, D, &mut self.width, decoder, offset + 0, _depth)?;
fidl::decode!(f32, D, &mut self.height, decoder, offset + 4, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for SizeU {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for SizeU {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SizeU, D> for &SizeU {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SizeU>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut SizeU).write_unaligned((self as *const SizeU).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u32, D>,
T1: fidl::encoding::Encode<u32, D>,
> fidl::encoding::Encode<SizeU, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<SizeU>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SizeU {
#[inline(always)]
fn new_empty() -> Self {
Self { width: fidl::new_empty!(u32, D), height: fidl::new_empty!(u32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Transform {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Transform {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
64
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Transform, D>
for &Transform
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Transform>(offset);
fidl::encoding::Encode::<Transform, D>::encode(
(<fidl::encoding::Array<f32, 16> as fidl::encoding::ValueTypeMarker>::borrow(
&self.matrix,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Array<f32, 16>, D>,
> fidl::encoding::Encode<Transform, D> for (T0,)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Transform>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Transform {
#[inline(always)]
fn new_empty() -> Self {
Self { matrix: fidl::new_empty!(fidl::encoding::Array<f32, 16>, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(fidl::encoding::Array<f32, 16>, D, &mut self.matrix, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Vec_ {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Vec_ {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
true
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vec_, D> for &Vec_ {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Vec_>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut Vec_).write_unaligned((self as *const Vec_).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<i32, D>,
T1: fidl::encoding::Encode<i32, D>,
> fidl::encoding::Encode<Vec_, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Vec_>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vec_ {
#[inline(always)]
fn new_empty() -> Self {
Self { x: fidl::new_empty!(i32, D), y: fidl::new_empty!(i32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
unsafe {
std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Vec3F {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Vec3F {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
12
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vec3F, D> for &Vec3F {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Vec3F>(offset);
fidl::encoding::Encode::<Vec3F, D>::encode(
(
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.z),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<f32, D>,
T1: fidl::encoding::Encode<f32, D>,
T2: fidl::encoding::Encode<f32, D>,
> fidl::encoding::Encode<Vec3F, D> for (T0, T1, T2)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Vec3F>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vec3F {
#[inline(always)]
fn new_empty() -> Self {
Self {
x: fidl::new_empty!(f32, D),
y: fidl::new_empty!(f32, D),
z: fidl::new_empty!(f32, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
fidl::decode!(f32, D, &mut self.z, decoder, offset + 8, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Vec4F {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Vec4F {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
16
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vec4F, D> for &Vec4F {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Vec4F>(offset);
fidl::encoding::Encode::<Vec4F, D>::encode(
(
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.z),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.w),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<f32, D>,
T1: fidl::encoding::Encode<f32, D>,
T2: fidl::encoding::Encode<f32, D>,
T3: fidl::encoding::Encode<f32, D>,
> fidl::encoding::Encode<Vec4F, D> for (T0, T1, T2, T3)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Vec4F>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
self.2.encode(encoder, offset + 8, depth)?;
self.3.encode(encoder, offset + 12, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vec4F {
#[inline(always)]
fn new_empty() -> Self {
Self {
x: fidl::new_empty!(f32, D),
y: fidl::new_empty!(f32, D),
z: fidl::new_empty!(f32, D),
w: fidl::new_empty!(f32, D),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
fidl::decode!(f32, D, &mut self.z, decoder, offset + 8, _depth)?;
fidl::decode!(f32, D, &mut self.w, decoder, offset + 12, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for VecF {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for VecF {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
8
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VecF, D> for &VecF {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<VecF>(offset);
fidl::encoding::Encode::<VecF, D>::encode(
(
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<f32, D>,
T1: fidl::encoding::Encode<f32, D>,
> fidl::encoding::Encode<VecF, D> for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<VecF>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VecF {
#[inline(always)]
fn new_empty() -> Self {
Self { x: fidl::new_empty!(f32, D), y: fidl::new_empty!(f32, D) }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
Ok(())
}
}
}