#![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;
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(u32)]
pub enum OutOfBoundsDirection {
Below = 1,
Above = 2,
}
impl OutOfBoundsDirection {
#[inline]
pub fn from_primitive(prim: u32) -> Option<Self> {
match prim {
1 => Some(Self::Below),
2 => Some(Self::Above),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> u32 {
self as u32
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct BadDirectory {
pub path: String,
}
impl fidl::Persistable for BadDirectory {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct BadEntryType {
pub value: u8,
}
impl fidl::Persistable for BadEntryType {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct BadFile {
pub path: String,
}
impl fidl::Persistable for BadFile {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct BannedFeatureIncompat {
pub value: u32,
}
impl fidl::Persistable for BannedFeatureIncompat {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct BlockNumberOutOfBounds {
pub block_number: u64,
}
impl fidl::Persistable for BlockNumberOutOfBounds {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct BlockSizeInvalid {
pub block_size: u32,
}
impl fidl::Persistable for BlockSizeInvalid {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct DirEntry2NonUtf8 {
pub data: Vec<u8>,
}
impl fidl::Persistable for DirEntry2NonUtf8 {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct ExtentUnexpectedLength {
pub size: u64,
pub expected: u64,
}
impl fidl::Persistable for ExtentUnexpectedLength {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Incompatible {
pub msg: String,
}
impl fidl::Persistable for Incompatible {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct InvalidAddress {
pub position: u64,
pub direction: OutOfBoundsDirection,
pub bound: u64,
}
impl fidl::Persistable for InvalidAddress {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct InvalidBlockGroupDesc {
pub position: u64,
}
impl fidl::Persistable for InvalidBlockGroupDesc {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct InvalidDirEntry2 {
pub position: u64,
}
impl fidl::Persistable for InvalidDirEntry2 {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct InvalidExtent {
pub position: u64,
}
impl fidl::Persistable for InvalidExtent {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct InvalidExtentHeader;
impl fidl::Persistable for InvalidExtentHeader {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct InvalidExtentHeaderMagic {
pub value: u16,
}
impl fidl::Persistable for InvalidExtentHeaderMagic {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct InvalidINode {
pub inode_number: u32,
}
impl fidl::Persistable for InvalidINode {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct InvalidInputPath {
pub path: String,
}
impl fidl::Persistable for InvalidInputPath {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct InvalidSuperBlock {
pub position: u64,
}
impl fidl::Persistable for InvalidSuperBlock {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct InvalidSuperBlockMagic {
pub value: u16,
}
impl fidl::Persistable for InvalidSuperBlockMagic {}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct PathNotFound {
pub path: String,
}
impl fidl::Persistable for PathNotFound {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct ReaderOutOfBounds {
pub position: u64,
pub size: u64,
}
impl fidl::Persistable for ReaderOutOfBounds {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct ReaderReadError {
pub position: u64,
}
impl fidl::Persistable for ReaderReadError {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(C)]
pub struct RequiredFeatureIncompat {
pub value: u32,
}
impl fidl::Persistable for RequiredFeatureIncompat {}
#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ServerMountVmoRequest {
pub source: fidl::Vmo,
pub root: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
}
impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ServerMountVmoRequest {}
#[derive(Clone, Debug, PartialEq)]
pub struct ServerMountVmoResponse {
pub result: MountVmoResult,
}
impl fidl::Persistable for ServerMountVmoResponse {}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct Success;
impl fidl::Persistable for Success {}
#[derive(Clone, Debug)]
pub enum MountVmoResult {
Success(Success),
VmoReadFailure(i32),
ParseError(ParseError),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! MountVmoResultUnknown {
() => {
_
};
}
impl PartialEq for MountVmoResult {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::Success(x), Self::Success(y)) => *x == *y,
(Self::VmoReadFailure(x), Self::VmoReadFailure(y)) => *x == *y,
(Self::ParseError(x), Self::ParseError(y)) => *x == *y,
_ => false,
}
}
}
impl MountVmoResult {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::Success(_) => 1,
Self::VmoReadFailure(_) => 2,
Self::ParseError(_) => 3,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for MountVmoResult {}
#[derive(Clone, Debug)]
pub enum ParseError {
InvalidSuperBlock(InvalidSuperBlock),
InvalidSuperBlockMagic(InvalidSuperBlockMagic),
BlockNumberOutOfBounds(BlockNumberOutOfBounds),
BlockSizeInvalid(BlockSizeInvalid),
InvalidBlockGroupDesc(InvalidBlockGroupDesc),
InvalidInode(InvalidINode),
InvalidExtentHeader(InvalidExtentHeader),
InvalidExtentHeaderMagic(InvalidExtentHeaderMagic),
InvalidExtent(InvalidExtent),
ExtentUnexpectedLength(ExtentUnexpectedLength),
InvalidDirEntry2(InvalidDirEntry2),
DirEntry2NonUtf8(DirEntry2NonUtf8),
InvalidInputPath(InvalidInputPath),
PathNotFound(PathNotFound),
BadEntryType(BadEntryType),
Incompatible(Incompatible),
BadFile(BadFile),
BadDirectory(BadDirectory),
ReaderReadError(ReaderReadError),
ReaderOutOfBounds(ReaderOutOfBounds),
RequiredFeatureIncompat(RequiredFeatureIncompat),
BannedFeatureIncompat(BannedFeatureIncompat),
InvalidAddress(InvalidAddress),
#[doc(hidden)]
__SourceBreaking {
unknown_ordinal: u64,
},
}
#[macro_export]
macro_rules! ParseErrorUnknown {
() => {
_
};
}
impl PartialEq for ParseError {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::InvalidSuperBlock(x), Self::InvalidSuperBlock(y)) => *x == *y,
(Self::InvalidSuperBlockMagic(x), Self::InvalidSuperBlockMagic(y)) => *x == *y,
(Self::BlockNumberOutOfBounds(x), Self::BlockNumberOutOfBounds(y)) => *x == *y,
(Self::BlockSizeInvalid(x), Self::BlockSizeInvalid(y)) => *x == *y,
(Self::InvalidBlockGroupDesc(x), Self::InvalidBlockGroupDesc(y)) => *x == *y,
(Self::InvalidInode(x), Self::InvalidInode(y)) => *x == *y,
(Self::InvalidExtentHeader(x), Self::InvalidExtentHeader(y)) => *x == *y,
(Self::InvalidExtentHeaderMagic(x), Self::InvalidExtentHeaderMagic(y)) => *x == *y,
(Self::InvalidExtent(x), Self::InvalidExtent(y)) => *x == *y,
(Self::ExtentUnexpectedLength(x), Self::ExtentUnexpectedLength(y)) => *x == *y,
(Self::InvalidDirEntry2(x), Self::InvalidDirEntry2(y)) => *x == *y,
(Self::DirEntry2NonUtf8(x), Self::DirEntry2NonUtf8(y)) => *x == *y,
(Self::InvalidInputPath(x), Self::InvalidInputPath(y)) => *x == *y,
(Self::PathNotFound(x), Self::PathNotFound(y)) => *x == *y,
(Self::BadEntryType(x), Self::BadEntryType(y)) => *x == *y,
(Self::Incompatible(x), Self::Incompatible(y)) => *x == *y,
(Self::BadFile(x), Self::BadFile(y)) => *x == *y,
(Self::BadDirectory(x), Self::BadDirectory(y)) => *x == *y,
(Self::ReaderReadError(x), Self::ReaderReadError(y)) => *x == *y,
(Self::ReaderOutOfBounds(x), Self::ReaderOutOfBounds(y)) => *x == *y,
(Self::RequiredFeatureIncompat(x), Self::RequiredFeatureIncompat(y)) => *x == *y,
(Self::BannedFeatureIncompat(x), Self::BannedFeatureIncompat(y)) => *x == *y,
(Self::InvalidAddress(x), Self::InvalidAddress(y)) => *x == *y,
_ => false,
}
}
}
impl ParseError {
#[inline]
pub fn ordinal(&self) -> u64 {
match *self {
Self::InvalidSuperBlock(_) => 1,
Self::InvalidSuperBlockMagic(_) => 2,
Self::BlockNumberOutOfBounds(_) => 3,
Self::BlockSizeInvalid(_) => 4,
Self::InvalidBlockGroupDesc(_) => 5,
Self::InvalidInode(_) => 6,
Self::InvalidExtentHeader(_) => 7,
Self::InvalidExtentHeaderMagic(_) => 8,
Self::InvalidExtent(_) => 9,
Self::ExtentUnexpectedLength(_) => 10,
Self::InvalidDirEntry2(_) => 11,
Self::DirEntry2NonUtf8(_) => 12,
Self::InvalidInputPath(_) => 13,
Self::PathNotFound(_) => 14,
Self::BadEntryType(_) => 15,
Self::Incompatible(_) => 16,
Self::BadFile(_) => 17,
Self::BadDirectory(_) => 18,
Self::ReaderReadError(_) => 19,
Self::ReaderOutOfBounds(_) => 20,
Self::RequiredFeatureIncompat(_) => 21,
Self::BannedFeatureIncompat(_) => 22,
Self::InvalidAddress(_) => 23,
Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
}
}
#[inline]
pub fn unknown_variant_for_testing() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
pub fn is_unknown(&self) -> bool {
match self {
Self::__SourceBreaking { .. } => true,
_ => false,
}
}
}
impl fidl::Persistable for ParseError {}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct Server_Marker;
impl fidl::endpoints::ProtocolMarker for Server_Marker {
type Proxy = Server_Proxy;
type RequestStream = Server_RequestStream;
#[cfg(target_os = "fuchsia")]
type SynchronousProxy = Server_SynchronousProxy;
const DEBUG_NAME: &'static str = "fuchsia.storage.ext4.Server";
}
impl fidl::endpoints::DiscoverableProtocolMarker for Server_Marker {}
pub trait Server_ProxyInterface: Send + Sync {
type MountVmoResponseFut: std::future::Future<Output = Result<MountVmoResult, fidl::Error>>
+ Send;
fn r#mount_vmo(
&self,
source: fidl::Vmo,
root: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Self::MountVmoResponseFut;
}
#[derive(Debug)]
#[cfg(target_os = "fuchsia")]
pub struct Server_SynchronousProxy {
client: fidl::client::sync::Client,
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::SynchronousProxy for Server_SynchronousProxy {
type Proxy = Server_Proxy;
type Protocol = Server_Marker;
fn from_channel(inner: fidl::Channel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
fn as_channel(&self) -> &fidl::Channel {
self.client.as_channel()
}
}
#[cfg(target_os = "fuchsia")]
impl Server_SynchronousProxy {
pub fn new(channel: fidl::Channel) -> Self {
let protocol_name = <Server_Marker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
}
pub fn into_channel(self) -> fidl::Channel {
self.client.into_channel()
}
pub fn wait_for_event(
&self,
deadline: zx::MonotonicInstant,
) -> Result<Server_Event, fidl::Error> {
Server_Event::decode(self.client.wait_for_event(deadline)?)
}
pub fn r#mount_vmo(
&self,
mut source: fidl::Vmo,
mut root: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
___deadline: zx::MonotonicInstant,
) -> Result<MountVmoResult, fidl::Error> {
let _response = self.client.send_query::<ServerMountVmoRequest, ServerMountVmoResponse>(
(source, root),
0x191360124db7f6a6,
fidl::encoding::DynamicFlags::empty(),
___deadline,
)?;
Ok(_response.result)
}
}
#[derive(Debug, Clone)]
pub struct Server_Proxy {
client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl fidl::endpoints::Proxy for Server_Proxy {
type Protocol = Server_Marker;
fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
Self::new(inner)
}
fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
self.client.into_channel().map_err(|client| Self { client })
}
fn as_channel(&self) -> &::fidl::AsyncChannel {
self.client.as_channel()
}
}
impl Server_Proxy {
pub fn new(channel: ::fidl::AsyncChannel) -> Self {
let protocol_name = <Server_Marker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
Self { client: fidl::client::Client::new(channel, protocol_name) }
}
pub fn take_event_stream(&self) -> Server_EventStream {
Server_EventStream { event_receiver: self.client.take_event_receiver() }
}
pub fn r#mount_vmo(
&self,
mut source: fidl::Vmo,
mut root: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> fidl::client::QueryResponseFut<MountVmoResult, fidl::encoding::DefaultFuchsiaResourceDialect>
{
Server_ProxyInterface::r#mount_vmo(self, source, root)
}
}
impl Server_ProxyInterface for Server_Proxy {
type MountVmoResponseFut = fidl::client::QueryResponseFut<
MountVmoResult,
fidl::encoding::DefaultFuchsiaResourceDialect,
>;
fn r#mount_vmo(
&self,
mut source: fidl::Vmo,
mut root: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
) -> Self::MountVmoResponseFut {
fn _decode(
mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
) -> Result<MountVmoResult, fidl::Error> {
let _response = fidl::client::decode_transaction_body::<
ServerMountVmoResponse,
fidl::encoding::DefaultFuchsiaResourceDialect,
0x191360124db7f6a6,
>(_buf?)?;
Ok(_response.result)
}
self.client.send_query_and_decode::<ServerMountVmoRequest, MountVmoResult>(
(source, root),
0x191360124db7f6a6,
fidl::encoding::DynamicFlags::empty(),
_decode,
)
}
}
pub struct Server_EventStream {
event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
}
impl std::marker::Unpin for Server_EventStream {}
impl futures::stream::FusedStream for Server_EventStream {
fn is_terminated(&self) -> bool {
self.event_receiver.is_terminated()
}
}
impl futures::Stream for Server_EventStream {
type Item = Result<Server_Event, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
&mut self.event_receiver,
cx
)?) {
Some(buf) => std::task::Poll::Ready(Some(Server_Event::decode(buf))),
None => std::task::Poll::Ready(None),
}
}
}
#[derive(Debug)]
pub enum Server_Event {}
impl Server_Event {
fn decode(
mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
) -> Result<Server_Event, fidl::Error> {
let (bytes, _handles) = buf.split_mut();
let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
debug_assert_eq!(tx_header.tx_id, 0);
match tx_header.ordinal {
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: tx_header.ordinal,
protocol_name: <Server_Marker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}
}
}
pub struct Server_RequestStream {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
}
impl std::marker::Unpin for Server_RequestStream {}
impl futures::stream::FusedStream for Server_RequestStream {
fn is_terminated(&self) -> bool {
self.is_terminated
}
}
impl fidl::endpoints::RequestStream for Server_RequestStream {
type Protocol = Server_Marker;
type ControlHandle = Server_ControlHandle;
fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
}
fn control_handle(&self) -> Self::ControlHandle {
Server_ControlHandle { inner: self.inner.clone() }
}
fn into_inner(
self,
) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
{
(self.inner, self.is_terminated)
}
fn from_inner(
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
is_terminated: bool,
) -> Self {
Self { inner, is_terminated }
}
}
impl futures::Stream for Server_RequestStream {
type Item = Result<Server_Request, fidl::Error>;
fn poll_next(
mut self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
let this = &mut *self;
if this.inner.check_shutdown(cx) {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
if this.is_terminated {
panic!("polled Server_RequestStream after completion");
}
fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
|bytes, handles| {
match this.inner.channel().read_etc(cx, bytes, handles) {
std::task::Poll::Ready(Ok(())) => {}
std::task::Poll::Pending => return std::task::Poll::Pending,
std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
this.is_terminated = true;
return std::task::Poll::Ready(None);
}
std::task::Poll::Ready(Err(e)) => {
return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
e.into(),
))))
}
}
let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
std::task::Poll::Ready(Some(match header.ordinal {
0x191360124db7f6a6 => {
header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
let mut req = fidl::new_empty!(
ServerMountVmoRequest,
fidl::encoding::DefaultFuchsiaResourceDialect
);
fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ServerMountVmoRequest>(&header, _body_bytes, handles, &mut req)?;
let control_handle = Server_ControlHandle { inner: this.inner.clone() };
Ok(Server_Request::MountVmo {
source: req.source,
root: req.root,
responder: Server_MountVmoResponder {
control_handle: std::mem::ManuallyDrop::new(control_handle),
tx_id: header.tx_id,
},
})
}
_ => Err(fidl::Error::UnknownOrdinal {
ordinal: header.ordinal,
protocol_name:
<Server_Marker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
}),
}))
},
)
}
}
#[derive(Debug)]
pub enum Server_Request {
MountVmo {
source: fidl::Vmo,
root: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
responder: Server_MountVmoResponder,
},
}
impl Server_Request {
#[allow(irrefutable_let_patterns)]
pub fn into_mount_vmo(
self,
) -> Option<(
fidl::Vmo,
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
Server_MountVmoResponder,
)> {
if let Server_Request::MountVmo { source, root, responder } = self {
Some((source, root, responder))
} else {
None
}
}
pub fn method_name(&self) -> &'static str {
match *self {
Server_Request::MountVmo { .. } => "mount_vmo",
}
}
}
#[derive(Debug, Clone)]
pub struct Server_ControlHandle {
inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
}
impl fidl::endpoints::ControlHandle for Server_ControlHandle {
fn shutdown(&self) {
self.inner.shutdown()
}
fn shutdown_with_epitaph(&self, status: zx_status::Status) {
self.inner.shutdown_with_epitaph(status)
}
fn is_closed(&self) -> bool {
self.inner.channel().is_closed()
}
fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
self.inner.channel().on_closed()
}
#[cfg(target_os = "fuchsia")]
fn signal_peer(
&self,
clear_mask: zx::Signals,
set_mask: zx::Signals,
) -> Result<(), zx_status::Status> {
use fidl::Peered;
self.inner.channel().signal_peer(clear_mask, set_mask)
}
}
impl Server_ControlHandle {}
#[must_use = "FIDL methods require a response to be sent"]
#[derive(Debug)]
pub struct Server_MountVmoResponder {
control_handle: std::mem::ManuallyDrop<Server_ControlHandle>,
tx_id: u32,
}
impl std::ops::Drop for Server_MountVmoResponder {
fn drop(&mut self) {
self.control_handle.shutdown();
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
}
}
impl fidl::endpoints::Responder for Server_MountVmoResponder {
type ControlHandle = Server_ControlHandle;
fn control_handle(&self) -> &Server_ControlHandle {
&self.control_handle
}
fn drop_without_shutdown(mut self) {
unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
std::mem::forget(self);
}
}
impl Server_MountVmoResponder {
pub fn send(self, mut result: &MountVmoResult) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
if _result.is_err() {
self.control_handle.shutdown();
}
self.drop_without_shutdown();
_result
}
pub fn send_no_shutdown_on_err(self, mut result: &MountVmoResult) -> Result<(), fidl::Error> {
let _result = self.send_raw(result);
self.drop_without_shutdown();
_result
}
fn send_raw(&self, mut result: &MountVmoResult) -> Result<(), fidl::Error> {
self.control_handle.inner.send::<ServerMountVmoResponse>(
(result,),
self.tx_id,
0x191360124db7f6a6,
fidl::encoding::DynamicFlags::empty(),
)
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct ServiceMarker;
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::ServiceMarker for ServiceMarker {
type Proxy = ServiceProxy;
type Request = ServiceRequest;
const SERVICE_NAME: &'static str = "fuchsia.storage.ext4.Service";
}
#[cfg(target_os = "fuchsia")]
pub enum ServiceRequest {
Server(Server_RequestStream),
}
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::ServiceRequest for ServiceRequest {
type Service = ServiceMarker;
fn dispatch(name: &str, _channel: fidl::AsyncChannel) -> Self {
match name {
"server" => Self::Server(
<Server_RequestStream as fidl::endpoints::RequestStream>::from_channel(_channel),
),
_ => panic!("no such member protocol name for service Service"),
}
}
fn member_names() -> &'static [&'static str] {
&["server"]
}
}
#[cfg(target_os = "fuchsia")]
pub struct ServiceProxy(#[allow(dead_code)] Box<dyn fidl::endpoints::MemberOpener>);
#[cfg(target_os = "fuchsia")]
impl fidl::endpoints::ServiceProxy for ServiceProxy {
type Service = ServiceMarker;
fn from_member_opener(opener: Box<dyn fidl::endpoints::MemberOpener>) -> Self {
Self(opener)
}
}
#[cfg(target_os = "fuchsia")]
impl ServiceProxy {
pub fn connect_to_server(&self) -> Result<Server_Proxy, fidl::Error> {
let (proxy, server_end) = fidl::endpoints::create_proxy::<Server_Marker>();
self.connect_channel_to_server(server_end)?;
Ok(proxy)
}
pub fn connect_to_server_sync(&self) -> Result<Server_SynchronousProxy, fidl::Error> {
let (proxy, server_end) = fidl::endpoints::create_sync_proxy::<Server_Marker>();
self.connect_channel_to_server(server_end)?;
Ok(proxy)
}
pub fn connect_channel_to_server(
&self,
server_end: fidl::endpoints::ServerEnd<Server_Marker>,
) -> Result<(), fidl::Error> {
self.0.open_member("server", server_end.into_channel())
}
}
mod internal {
use super::*;
unsafe impl fidl::encoding::TypeMarker for OutOfBoundsDirection {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
std::mem::align_of::<u32>()
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
std::mem::size_of::<u32>()
}
#[inline(always)]
fn encode_is_copy() -> bool {
true
}
#[inline(always)]
fn decode_is_copy() -> bool {
false
}
}
impl fidl::encoding::ValueTypeMarker for OutOfBoundsDirection {
type Borrowed<'a> = Self;
#[inline(always)]
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
*value
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
for OutOfBoundsDirection
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Self>(offset);
encoder.write_num(self.into_primitive(), offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OutOfBoundsDirection {
#[inline(always)]
fn new_empty() -> Self {
Self::Below
}
#[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 prim = decoder.read_num::<u32>(offset);
*self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for BadDirectory {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for BadDirectory {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BadDirectory, D>
for &BadDirectory
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<BadDirectory>(offset);
fidl::encoding::Encode::<BadDirectory, D>::encode(
(<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
&self.path,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
> fidl::encoding::Encode<BadDirectory, 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::<BadDirectory>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BadDirectory {
#[inline(always)]
fn new_empty() -> Self {
Self { path: fidl::new_empty!(fidl::encoding::BoundedString<1024>, 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::BoundedString<1024>,
D,
&mut self.path,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for BadEntryType {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for BadEntryType {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
1
}
#[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<BadEntryType, D>
for &BadEntryType
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<BadEntryType>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut BadEntryType)
.write_unaligned((self as *const BadEntryType).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
fidl::encoding::Encode<BadEntryType, 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::<BadEntryType>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BadEntryType {
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(u8, 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, 1);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for BadFile {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for BadFile {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BadFile, D> for &BadFile {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<BadFile>(offset);
fidl::encoding::Encode::<BadFile, D>::encode(
(<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
&self.path,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
> fidl::encoding::Encode<BadFile, 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::<BadFile>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BadFile {
#[inline(always)]
fn new_empty() -> Self {
Self { path: fidl::new_empty!(fidl::encoding::BoundedString<1024>, 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::BoundedString<1024>,
D,
&mut self.path,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for BannedFeatureIncompat {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for BannedFeatureIncompat {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[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<BannedFeatureIncompat, D>
for &BannedFeatureIncompat
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<BannedFeatureIncompat>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut BannedFeatureIncompat)
.write_unaligned((self as *const BannedFeatureIncompat).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
fidl::encoding::Encode<BannedFeatureIncompat, 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::<BannedFeatureIncompat>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BannedFeatureIncompat {
#[inline(always)]
fn new_empty() -> Self {
Self { value: 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, 4);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for BlockNumberOutOfBounds {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for BlockNumberOutOfBounds {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[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<BlockNumberOutOfBounds, D> for &BlockNumberOutOfBounds
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<BlockNumberOutOfBounds>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut BlockNumberOutOfBounds)
.write_unaligned((self as *const BlockNumberOutOfBounds).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
fidl::encoding::Encode<BlockNumberOutOfBounds, 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::<BlockNumberOutOfBounds>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for BlockNumberOutOfBounds
{
#[inline(always)]
fn new_empty() -> Self {
Self { block_number: 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, 8);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for BlockSizeInvalid {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for BlockSizeInvalid {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[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<BlockSizeInvalid, D>
for &BlockSizeInvalid
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<BlockSizeInvalid>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut BlockSizeInvalid)
.write_unaligned((self as *const BlockSizeInvalid).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
fidl::encoding::Encode<BlockSizeInvalid, 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::<BlockSizeInvalid>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BlockSizeInvalid {
#[inline(always)]
fn new_empty() -> Self {
Self { block_size: 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, 4);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for DirEntry2NonUtf8 {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for DirEntry2NonUtf8 {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DirEntry2NonUtf8, D>
for &DirEntry2NonUtf8
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<DirEntry2NonUtf8>(offset);
fidl::encoding::Encode::<DirEntry2NonUtf8, D>::encode(
(<fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
&self.data,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 255>, D>,
> fidl::encoding::Encode<DirEntry2NonUtf8, 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::<DirEntry2NonUtf8>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DirEntry2NonUtf8 {
#[inline(always)]
fn new_empty() -> Self {
Self { data: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, 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::Vector<u8, 255>, D, &mut self.data, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ExtentUnexpectedLength {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ExtentUnexpectedLength {
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<ExtentUnexpectedLength, D> for &ExtentUnexpectedLength
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ExtentUnexpectedLength>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut ExtentUnexpectedLength)
.write_unaligned((self as *const ExtentUnexpectedLength).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u64, D>,
T1: fidl::encoding::Encode<u64, D>,
> fidl::encoding::Encode<ExtentUnexpectedLength, 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::<ExtentUnexpectedLength>(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 ExtentUnexpectedLength
{
#[inline(always)]
fn new_empty() -> Self {
Self { size: fidl::new_empty!(u64, D), expected: 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 Incompatible {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Incompatible {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Incompatible, D>
for &Incompatible
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Incompatible>(offset);
fidl::encoding::Encode::<Incompatible, D>::encode(
(<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
&self.msg,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
> fidl::encoding::Encode<Incompatible, 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::<Incompatible>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Incompatible {
#[inline(always)]
fn new_empty() -> Self {
Self { msg: fidl::new_empty!(fidl::encoding::BoundedString<1024>, 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::BoundedString<1024>,
D,
&mut self.msg,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for InvalidAddress {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for InvalidAddress {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
24
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidAddress, D>
for &InvalidAddress
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InvalidAddress>(offset);
fidl::encoding::Encode::<InvalidAddress, D>::encode(
(
<u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.position),
<OutOfBoundsDirection as fidl::encoding::ValueTypeMarker>::borrow(
&self.direction,
),
<u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.bound),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u64, D>,
T1: fidl::encoding::Encode<OutOfBoundsDirection, D>,
T2: fidl::encoding::Encode<u64, D>,
> fidl::encoding::Encode<InvalidAddress, 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::<InvalidAddress>(offset);
unsafe {
let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
(ptr as *mut u64).write_unaligned(0);
}
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 8, depth)?;
self.2.encode(encoder, offset + 16, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidAddress {
#[inline(always)]
fn new_empty() -> Self {
Self {
position: fidl::new_empty!(u64, D),
direction: fidl::new_empty!(OutOfBoundsDirection, D),
bound: 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 ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
let padval = unsafe { (ptr as *const u64).read_unaligned() };
let mask = 0xffffffff00000000u64;
let maskedval = padval & mask;
if maskedval != 0 {
return Err(fidl::Error::NonZeroPadding {
padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
});
}
fidl::decode!(u64, D, &mut self.position, decoder, offset + 0, _depth)?;
fidl::decode!(
OutOfBoundsDirection,
D,
&mut self.direction,
decoder,
offset + 8,
_depth
)?;
fidl::decode!(u64, D, &mut self.bound, decoder, offset + 16, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for InvalidBlockGroupDesc {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for InvalidBlockGroupDesc {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[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<InvalidBlockGroupDesc, D>
for &InvalidBlockGroupDesc
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InvalidBlockGroupDesc>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut InvalidBlockGroupDesc)
.write_unaligned((self as *const InvalidBlockGroupDesc).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
fidl::encoding::Encode<InvalidBlockGroupDesc, 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::<InvalidBlockGroupDesc>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidBlockGroupDesc {
#[inline(always)]
fn new_empty() -> Self {
Self { position: 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, 8);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for InvalidDirEntry2 {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for InvalidDirEntry2 {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[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<InvalidDirEntry2, D>
for &InvalidDirEntry2
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InvalidDirEntry2>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut InvalidDirEntry2)
.write_unaligned((self as *const InvalidDirEntry2).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
fidl::encoding::Encode<InvalidDirEntry2, 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::<InvalidDirEntry2>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidDirEntry2 {
#[inline(always)]
fn new_empty() -> Self {
Self { position: 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, 8);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for InvalidExtent {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for InvalidExtent {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[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<InvalidExtent, D>
for &InvalidExtent
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InvalidExtent>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut InvalidExtent)
.write_unaligned((self as *const InvalidExtent).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
fidl::encoding::Encode<InvalidExtent, 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::<InvalidExtent>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidExtent {
#[inline(always)]
fn new_empty() -> Self {
Self { position: 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, 8);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for InvalidExtentHeader {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for InvalidExtentHeader {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
1
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidExtentHeader, D>
for &InvalidExtentHeader
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InvalidExtentHeader>(offset);
encoder.write_num(0u8, offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidExtentHeader {
#[inline(always)]
fn new_empty() -> Self {
Self
}
#[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);
match decoder.read_num::<u8>(offset) {
0 => Ok(()),
_ => Err(fidl::Error::Invalid),
}
}
}
impl fidl::encoding::ValueTypeMarker for InvalidExtentHeaderMagic {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for InvalidExtentHeaderMagic {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2
}
#[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<InvalidExtentHeaderMagic, D> for &InvalidExtentHeaderMagic
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InvalidExtentHeaderMagic>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut InvalidExtentHeaderMagic)
.write_unaligned((self as *const InvalidExtentHeaderMagic).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
fidl::encoding::Encode<InvalidExtentHeaderMagic, 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::<InvalidExtentHeaderMagic>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for InvalidExtentHeaderMagic
{
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(u16, 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, 2);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for InvalidINode {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for InvalidINode {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[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<InvalidINode, D>
for &InvalidINode
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InvalidINode>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut InvalidINode)
.write_unaligned((self as *const InvalidINode).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
fidl::encoding::Encode<InvalidINode, 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::<InvalidINode>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidINode {
#[inline(always)]
fn new_empty() -> Self {
Self { inode_number: 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, 4);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for InvalidInputPath {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for InvalidInputPath {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidInputPath, D>
for &InvalidInputPath
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InvalidInputPath>(offset);
fidl::encoding::Encode::<InvalidInputPath, D>::encode(
(<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
&self.path,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
> fidl::encoding::Encode<InvalidInputPath, 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::<InvalidInputPath>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidInputPath {
#[inline(always)]
fn new_empty() -> Self {
Self { path: fidl::new_empty!(fidl::encoding::BoundedString<1024>, 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::BoundedString<1024>,
D,
&mut self.path,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for InvalidSuperBlock {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for InvalidSuperBlock {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[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<InvalidSuperBlock, D>
for &InvalidSuperBlock
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InvalidSuperBlock>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut InvalidSuperBlock)
.write_unaligned((self as *const InvalidSuperBlock).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
fidl::encoding::Encode<InvalidSuperBlock, 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::<InvalidSuperBlock>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidSuperBlock {
#[inline(always)]
fn new_empty() -> Self {
Self { position: 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, 8);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for InvalidSuperBlockMagic {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for InvalidSuperBlockMagic {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
2
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
2
}
#[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<InvalidSuperBlockMagic, D> for &InvalidSuperBlockMagic
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<InvalidSuperBlockMagic>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut InvalidSuperBlockMagic)
.write_unaligned((self as *const InvalidSuperBlockMagic).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
fidl::encoding::Encode<InvalidSuperBlockMagic, 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::<InvalidSuperBlockMagic>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for InvalidSuperBlockMagic
{
#[inline(always)]
fn new_empty() -> Self {
Self { value: fidl::new_empty!(u16, 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, 2);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for PathNotFound {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for PathNotFound {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PathNotFound, D>
for &PathNotFound
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<PathNotFound>(offset);
fidl::encoding::Encode::<PathNotFound, D>::encode(
(<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
&self.path,
),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
> fidl::encoding::Encode<PathNotFound, 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::<PathNotFound>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PathNotFound {
#[inline(always)]
fn new_empty() -> Self {
Self { path: fidl::new_empty!(fidl::encoding::BoundedString<1024>, 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::BoundedString<1024>,
D,
&mut self.path,
decoder,
offset + 0,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ReaderOutOfBounds {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ReaderOutOfBounds {
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<ReaderOutOfBounds, D>
for &ReaderOutOfBounds
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ReaderOutOfBounds>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut ReaderOutOfBounds)
.write_unaligned((self as *const ReaderOutOfBounds).read());
}
Ok(())
}
}
unsafe impl<
D: fidl::encoding::ResourceDialect,
T0: fidl::encoding::Encode<u64, D>,
T1: fidl::encoding::Encode<u64, D>,
> fidl::encoding::Encode<ReaderOutOfBounds, 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::<ReaderOutOfBounds>(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 ReaderOutOfBounds {
#[inline(always)]
fn new_empty() -> Self {
Self { position: fidl::new_empty!(u64, D), size: 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 ReaderReadError {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ReaderReadError {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
8
}
#[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<ReaderReadError, D>
for &ReaderReadError
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ReaderReadError>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut ReaderReadError)
.write_unaligned((self as *const ReaderReadError).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
fidl::encoding::Encode<ReaderReadError, 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::<ReaderReadError>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReaderReadError {
#[inline(always)]
fn new_empty() -> Self {
Self { position: 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, 8);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for RequiredFeatureIncompat {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for RequiredFeatureIncompat {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
4
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
4
}
#[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<RequiredFeatureIncompat, D> for &RequiredFeatureIncompat
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<RequiredFeatureIncompat>(offset);
unsafe {
let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
(buf_ptr as *mut RequiredFeatureIncompat)
.write_unaligned((self as *const RequiredFeatureIncompat).read());
}
Ok(())
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
fidl::encoding::Encode<RequiredFeatureIncompat, 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::<RequiredFeatureIncompat>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for RequiredFeatureIncompat
{
#[inline(always)]
fn new_empty() -> Self {
Self { value: 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, 4);
}
Ok(())
}
}
impl fidl::encoding::ResourceTypeMarker for ServerMountVmoRequest {
type Borrowed<'a> = &'a mut Self;
fn take_or_borrow<'a>(
value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
) -> Self::Borrowed<'a> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ServerMountVmoRequest {
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
fidl::encoding::Encode<ServerMountVmoRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
for &mut ServerMountVmoRequest
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ServerMountVmoRequest>(offset);
fidl::encoding::Encode::<
ServerMountVmoRequest,
fidl::encoding::DefaultFuchsiaResourceDialect,
>::encode(
(
<fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.source
),
<fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
&mut self.root
),
),
encoder,
offset,
_depth,
)
}
}
unsafe impl<
T0: fidl::encoding::Encode<
fidl::encoding::HandleType<
fidl::Vmo,
{ fidl::ObjectType::VMO.into_raw() },
2147483648,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
T1: fidl::encoding::Encode<
fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
>
fidl::encoding::Encode<ServerMountVmoRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
for (T0, T1)
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ServerMountVmoRequest>(offset);
self.0.encode(encoder, offset + 0, depth)?;
self.1.encode(encoder, offset + 4, depth)?;
Ok(())
}
}
impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
for ServerMountVmoRequest
{
#[inline(always)]
fn new_empty() -> Self {
Self {
source: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
root: fidl::new_empty!(
fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect
),
}
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<
'_,
fidl::encoding::DefaultFuchsiaResourceDialect,
>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.source, decoder, offset + 0, _depth)?;
fidl::decode!(
fidl::encoding::Endpoint<
fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
>,
fidl::encoding::DefaultFuchsiaResourceDialect,
&mut self.root,
decoder,
offset + 4,
_depth
)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ServerMountVmoResponse {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ServerMountVmoResponse {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect>
fidl::encoding::Encode<ServerMountVmoResponse, D> for &ServerMountVmoResponse
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ServerMountVmoResponse>(offset);
fidl::encoding::Encode::<ServerMountVmoResponse, D>::encode(
(<MountVmoResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
encoder,
offset,
_depth,
)
}
}
unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<MountVmoResult, D>>
fidl::encoding::Encode<ServerMountVmoResponse, 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::<ServerMountVmoResponse>(offset);
self.0.encode(encoder, offset + 0, depth)?;
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
for ServerMountVmoResponse
{
#[inline(always)]
fn new_empty() -> Self {
Self { result: fidl::new_empty!(MountVmoResult, 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!(MountVmoResult, D, &mut self.result, decoder, offset + 0, _depth)?;
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for Success {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for Success {
type Owned = Self;
#[inline(always)]
fn inline_align(_context: fidl::encoding::Context) -> usize {
1
}
#[inline(always)]
fn inline_size(_context: fidl::encoding::Context) -> usize {
1
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Success, D> for &Success {
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<Success>(offset);
encoder.write_num(0u8, offset);
Ok(())
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Success {
#[inline(always)]
fn new_empty() -> Self {
Self
}
#[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);
match decoder.read_num::<u8>(offset) {
0 => Ok(()),
_ => Err(fidl::Error::Invalid),
}
}
}
impl fidl::encoding::ValueTypeMarker for MountVmoResult {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for MountVmoResult {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MountVmoResult, D>
for &MountVmoResult
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<MountVmoResult>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
MountVmoResult::Success(ref val) => {
fidl::encoding::encode_in_envelope::<Success, D>(
<Success as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
MountVmoResult::VmoReadFailure(ref val) => {
fidl::encoding::encode_in_envelope::<i32, D>(
<i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
MountVmoResult::ParseError(ref val) => {
fidl::encoding::encode_in_envelope::<ParseError, D>(
<ParseError as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
MountVmoResult::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
}
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MountVmoResult {
#[inline(always)]
fn new_empty() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
#[allow(unused_variables)]
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
let (ordinal, inlined, num_bytes, num_handles) =
fidl::encoding::decode_union_inline_portion(decoder, offset)?;
let member_inline_size = match ordinal {
1 => <Success as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3 => <ParseError as fidl::encoding::TypeMarker>::inline_size(decoder.context),
0 => return Err(fidl::Error::UnknownUnionTag),
_ => num_bytes as usize,
};
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let _inner_offset;
if inlined {
decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
_inner_offset = offset + 8;
} else {
depth.increment()?;
_inner_offset = decoder.out_of_line_offset(member_inline_size)?;
}
match ordinal {
1 => {
#[allow(irrefutable_let_patterns)]
if let MountVmoResult::Success(_) = self {
} else {
*self = MountVmoResult::Success(fidl::new_empty!(Success, D));
}
#[allow(irrefutable_let_patterns)]
if let MountVmoResult::Success(ref mut val) = self {
fidl::decode!(Success, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let MountVmoResult::VmoReadFailure(_) = self {
} else {
*self = MountVmoResult::VmoReadFailure(fidl::new_empty!(i32, D));
}
#[allow(irrefutable_let_patterns)]
if let MountVmoResult::VmoReadFailure(ref mut val) = self {
fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
3 => {
#[allow(irrefutable_let_patterns)]
if let MountVmoResult::ParseError(_) = self {
} else {
*self = MountVmoResult::ParseError(fidl::new_empty!(ParseError, D));
}
#[allow(irrefutable_let_patterns)]
if let MountVmoResult::ParseError(ref mut val) = self {
fidl::decode!(ParseError, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
#[allow(deprecated)]
ordinal => {
for _ in 0..num_handles {
decoder.drop_next_handle()?;
}
*self = MountVmoResult::__SourceBreaking { unknown_ordinal: ordinal };
}
}
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
Ok(())
}
}
impl fidl::encoding::ValueTypeMarker for ParseError {
type Borrowed<'a> = &'a Self;
fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
value
}
}
unsafe impl fidl::encoding::TypeMarker for ParseError {
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
}
}
unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ParseError, D>
for &ParseError
{
#[inline]
unsafe fn encode(
self,
encoder: &mut fidl::encoding::Encoder<'_, D>,
offset: usize,
_depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
encoder.debug_check_bounds::<ParseError>(offset);
encoder.write_num::<u64>(self.ordinal(), offset);
match self {
ParseError::InvalidSuperBlock(ref val) => {
fidl::encoding::encode_in_envelope::<InvalidSuperBlock, D>(
<InvalidSuperBlock as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::InvalidSuperBlockMagic(ref val) => {
fidl::encoding::encode_in_envelope::<InvalidSuperBlockMagic, D>(
<InvalidSuperBlockMagic as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::BlockNumberOutOfBounds(ref val) => {
fidl::encoding::encode_in_envelope::<BlockNumberOutOfBounds, D>(
<BlockNumberOutOfBounds as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::BlockSizeInvalid(ref val) => {
fidl::encoding::encode_in_envelope::<BlockSizeInvalid, D>(
<BlockSizeInvalid as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::InvalidBlockGroupDesc(ref val) => {
fidl::encoding::encode_in_envelope::<InvalidBlockGroupDesc, D>(
<InvalidBlockGroupDesc as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::InvalidInode(ref val) => {
fidl::encoding::encode_in_envelope::<InvalidINode, D>(
<InvalidINode as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::InvalidExtentHeader(ref val) => {
fidl::encoding::encode_in_envelope::<InvalidExtentHeader, D>(
<InvalidExtentHeader as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::InvalidExtentHeaderMagic(ref val) => {
fidl::encoding::encode_in_envelope::<InvalidExtentHeaderMagic, D>(
<InvalidExtentHeaderMagic as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::InvalidExtent(ref val) => {
fidl::encoding::encode_in_envelope::<InvalidExtent, D>(
<InvalidExtent as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::ExtentUnexpectedLength(ref val) => {
fidl::encoding::encode_in_envelope::<ExtentUnexpectedLength, D>(
<ExtentUnexpectedLength as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::InvalidDirEntry2(ref val) => {
fidl::encoding::encode_in_envelope::<InvalidDirEntry2, D>(
<InvalidDirEntry2 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::DirEntry2NonUtf8(ref val) => {
fidl::encoding::encode_in_envelope::<DirEntry2NonUtf8, D>(
<DirEntry2NonUtf8 as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::InvalidInputPath(ref val) => {
fidl::encoding::encode_in_envelope::<InvalidInputPath, D>(
<InvalidInputPath as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::PathNotFound(ref val) => {
fidl::encoding::encode_in_envelope::<PathNotFound, D>(
<PathNotFound as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::BadEntryType(ref val) => {
fidl::encoding::encode_in_envelope::<BadEntryType, D>(
<BadEntryType as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::Incompatible(ref val) => {
fidl::encoding::encode_in_envelope::<Incompatible, D>(
<Incompatible as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::BadFile(ref val) => fidl::encoding::encode_in_envelope::<BadFile, D>(
<BadFile as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
),
ParseError::BadDirectory(ref val) => {
fidl::encoding::encode_in_envelope::<BadDirectory, D>(
<BadDirectory as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::ReaderReadError(ref val) => {
fidl::encoding::encode_in_envelope::<ReaderReadError, D>(
<ReaderReadError as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::ReaderOutOfBounds(ref val) => {
fidl::encoding::encode_in_envelope::<ReaderOutOfBounds, D>(
<ReaderOutOfBounds as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::RequiredFeatureIncompat(ref val) => {
fidl::encoding::encode_in_envelope::<RequiredFeatureIncompat, D>(
<RequiredFeatureIncompat as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::BannedFeatureIncompat(ref val) => {
fidl::encoding::encode_in_envelope::<BannedFeatureIncompat, D>(
<BannedFeatureIncompat as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::InvalidAddress(ref val) => {
fidl::encoding::encode_in_envelope::<InvalidAddress, D>(
<InvalidAddress as fidl::encoding::ValueTypeMarker>::borrow(val),
encoder,
offset + 8,
_depth,
)
}
ParseError::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
}
}
}
impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ParseError {
#[inline(always)]
fn new_empty() -> Self {
Self::__SourceBreaking { unknown_ordinal: 0 }
}
#[inline]
unsafe fn decode(
&mut self,
decoder: &mut fidl::encoding::Decoder<'_, D>,
offset: usize,
mut depth: fidl::encoding::Depth,
) -> fidl::Result<()> {
decoder.debug_check_bounds::<Self>(offset);
#[allow(unused_variables)]
let next_out_of_line = decoder.next_out_of_line();
let handles_before = decoder.remaining_handles();
let (ordinal, inlined, num_bytes, num_handles) =
fidl::encoding::decode_union_inline_portion(decoder, offset)?;
let member_inline_size = match ordinal {
1 => {
<InvalidSuperBlock as fidl::encoding::TypeMarker>::inline_size(decoder.context)
}
2 => <InvalidSuperBlockMagic as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
3 => <BlockNumberOutOfBounds as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
4 => <BlockSizeInvalid as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5 => <InvalidBlockGroupDesc as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
6 => <InvalidINode as fidl::encoding::TypeMarker>::inline_size(decoder.context),
7 => <InvalidExtentHeader as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
8 => <InvalidExtentHeaderMagic as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
9 => <InvalidExtent as fidl::encoding::TypeMarker>::inline_size(decoder.context),
10 => <ExtentUnexpectedLength as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
11 => {
<InvalidDirEntry2 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
}
12 => {
<DirEntry2NonUtf8 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
}
13 => {
<InvalidInputPath as fidl::encoding::TypeMarker>::inline_size(decoder.context)
}
14 => <PathNotFound as fidl::encoding::TypeMarker>::inline_size(decoder.context),
15 => <BadEntryType as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16 => <Incompatible as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17 => <BadFile as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18 => <BadDirectory as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19 => <ReaderReadError as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20 => {
<ReaderOutOfBounds as fidl::encoding::TypeMarker>::inline_size(decoder.context)
}
21 => <RequiredFeatureIncompat as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
22 => <BannedFeatureIncompat as fidl::encoding::TypeMarker>::inline_size(
decoder.context,
),
23 => <InvalidAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context),
0 => return Err(fidl::Error::UnknownUnionTag),
_ => num_bytes as usize,
};
if inlined != (member_inline_size <= 4) {
return Err(fidl::Error::InvalidInlineBitInEnvelope);
}
let _inner_offset;
if inlined {
decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
_inner_offset = offset + 8;
} else {
depth.increment()?;
_inner_offset = decoder.out_of_line_offset(member_inline_size)?;
}
match ordinal {
1 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidSuperBlock(_) = self {
} else {
*self =
ParseError::InvalidSuperBlock(fidl::new_empty!(InvalidSuperBlock, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidSuperBlock(ref mut val) = self {
fidl::decode!(InvalidSuperBlock, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
2 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidSuperBlockMagic(_) = self {
} else {
*self = ParseError::InvalidSuperBlockMagic(fidl::new_empty!(
InvalidSuperBlockMagic,
D
));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidSuperBlockMagic(ref mut val) = self {
fidl::decode!(
InvalidSuperBlockMagic,
D,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
3 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::BlockNumberOutOfBounds(_) = self {
} else {
*self = ParseError::BlockNumberOutOfBounds(fidl::new_empty!(
BlockNumberOutOfBounds,
D
));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::BlockNumberOutOfBounds(ref mut val) = self {
fidl::decode!(
BlockNumberOutOfBounds,
D,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
4 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::BlockSizeInvalid(_) = self {
} else {
*self = ParseError::BlockSizeInvalid(fidl::new_empty!(BlockSizeInvalid, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::BlockSizeInvalid(ref mut val) = self {
fidl::decode!(BlockSizeInvalid, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
5 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidBlockGroupDesc(_) = self {
} else {
*self = ParseError::InvalidBlockGroupDesc(fidl::new_empty!(
InvalidBlockGroupDesc,
D
));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidBlockGroupDesc(ref mut val) = self {
fidl::decode!(
InvalidBlockGroupDesc,
D,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
6 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidInode(_) = self {
} else {
*self = ParseError::InvalidInode(fidl::new_empty!(InvalidINode, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidInode(ref mut val) = self {
fidl::decode!(InvalidINode, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
7 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidExtentHeader(_) = self {
} else {
*self = ParseError::InvalidExtentHeader(fidl::new_empty!(
InvalidExtentHeader,
D
));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidExtentHeader(ref mut val) = self {
fidl::decode!(InvalidExtentHeader, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
8 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidExtentHeaderMagic(_) = self {
} else {
*self = ParseError::InvalidExtentHeaderMagic(fidl::new_empty!(
InvalidExtentHeaderMagic,
D
));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidExtentHeaderMagic(ref mut val) = self {
fidl::decode!(
InvalidExtentHeaderMagic,
D,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
9 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidExtent(_) = self {
} else {
*self = ParseError::InvalidExtent(fidl::new_empty!(InvalidExtent, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidExtent(ref mut val) = self {
fidl::decode!(InvalidExtent, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
10 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::ExtentUnexpectedLength(_) = self {
} else {
*self = ParseError::ExtentUnexpectedLength(fidl::new_empty!(
ExtentUnexpectedLength,
D
));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::ExtentUnexpectedLength(ref mut val) = self {
fidl::decode!(
ExtentUnexpectedLength,
D,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
11 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidDirEntry2(_) = self {
} else {
*self = ParseError::InvalidDirEntry2(fidl::new_empty!(InvalidDirEntry2, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidDirEntry2(ref mut val) = self {
fidl::decode!(InvalidDirEntry2, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
12 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::DirEntry2NonUtf8(_) = self {
} else {
*self = ParseError::DirEntry2NonUtf8(fidl::new_empty!(DirEntry2NonUtf8, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::DirEntry2NonUtf8(ref mut val) = self {
fidl::decode!(DirEntry2NonUtf8, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
13 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidInputPath(_) = self {
} else {
*self = ParseError::InvalidInputPath(fidl::new_empty!(InvalidInputPath, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidInputPath(ref mut val) = self {
fidl::decode!(InvalidInputPath, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
14 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::PathNotFound(_) = self {
} else {
*self = ParseError::PathNotFound(fidl::new_empty!(PathNotFound, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::PathNotFound(ref mut val) = self {
fidl::decode!(PathNotFound, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
15 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::BadEntryType(_) = self {
} else {
*self = ParseError::BadEntryType(fidl::new_empty!(BadEntryType, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::BadEntryType(ref mut val) = self {
fidl::decode!(BadEntryType, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
16 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::Incompatible(_) = self {
} else {
*self = ParseError::Incompatible(fidl::new_empty!(Incompatible, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::Incompatible(ref mut val) = self {
fidl::decode!(Incompatible, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
17 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::BadFile(_) = self {
} else {
*self = ParseError::BadFile(fidl::new_empty!(BadFile, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::BadFile(ref mut val) = self {
fidl::decode!(BadFile, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
18 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::BadDirectory(_) = self {
} else {
*self = ParseError::BadDirectory(fidl::new_empty!(BadDirectory, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::BadDirectory(ref mut val) = self {
fidl::decode!(BadDirectory, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
19 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::ReaderReadError(_) = self {
} else {
*self = ParseError::ReaderReadError(fidl::new_empty!(ReaderReadError, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::ReaderReadError(ref mut val) = self {
fidl::decode!(ReaderReadError, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
20 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::ReaderOutOfBounds(_) = self {
} else {
*self =
ParseError::ReaderOutOfBounds(fidl::new_empty!(ReaderOutOfBounds, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::ReaderOutOfBounds(ref mut val) = self {
fidl::decode!(ReaderOutOfBounds, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
21 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::RequiredFeatureIncompat(_) = self {
} else {
*self = ParseError::RequiredFeatureIncompat(fidl::new_empty!(
RequiredFeatureIncompat,
D
));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::RequiredFeatureIncompat(ref mut val) = self {
fidl::decode!(
RequiredFeatureIncompat,
D,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
22 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::BannedFeatureIncompat(_) = self {
} else {
*self = ParseError::BannedFeatureIncompat(fidl::new_empty!(
BannedFeatureIncompat,
D
));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::BannedFeatureIncompat(ref mut val) = self {
fidl::decode!(
BannedFeatureIncompat,
D,
val,
decoder,
_inner_offset,
depth
)?;
} else {
unreachable!()
}
}
23 => {
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidAddress(_) = self {
} else {
*self = ParseError::InvalidAddress(fidl::new_empty!(InvalidAddress, D));
}
#[allow(irrefutable_let_patterns)]
if let ParseError::InvalidAddress(ref mut val) = self {
fidl::decode!(InvalidAddress, D, val, decoder, _inner_offset, depth)?;
} else {
unreachable!()
}
}
#[allow(deprecated)]
ordinal => {
for _ in 0..num_handles {
decoder.drop_next_handle()?;
}
*self = ParseError::__SourceBreaking { unknown_ordinal: ordinal };
}
}
if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
return Err(fidl::Error::InvalidNumBytesInEnvelope);
}
if handles_before != decoder.remaining_handles() + (num_handles as usize) {
return Err(fidl::Error::InvalidNumHandlesInEnvelope);
}
Ok(())
}
}
}