pub trait FidlCompatible<F>: Sized {
type FromError;
type IntoError;
// Required methods
fn try_from_fidl(fidl: F) -> Result<Self, Self::FromError>;
fn try_into_fidl(self) -> Result<F, Self::IntoError>;
}Expand description
A type which can be converted to and from a FIDL type F.
Required Associated Types§
Required Methods§
fn try_from_fidl(fidl: F) -> Result<Self, Self::FromError>
fn try_into_fidl(self) -> Result<F, Self::IntoError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl FidlCompatible<Ipv4Address> for Ipv4Addr
Available on Fuchsia only.
impl FidlCompatible<Ipv4Address> for Ipv4Addr
Available on Fuchsia only.
type FromError = Infallible
type IntoError = Infallible
fn try_from_fidl(fidl: Ipv4Address) -> Result<Self, Self::FromError>
fn try_into_fidl(self) -> Result<Ipv4Address, Self::IntoError>
Source§impl FidlCompatible<Vec<Ipv4Address>> for Vec<Ipv4Addr>
Available on Fuchsia only.
impl FidlCompatible<Vec<Ipv4Address>> for Vec<Ipv4Addr>
Available on Fuchsia only.
type FromError = Infallible
type IntoError = Infallible
fn try_from_fidl(fidl: Vec<Ipv4Address>) -> Result<Self, Self::FromError>
fn try_into_fidl(self) -> Result<Vec<Ipv4Address>, Self::IntoError>
Implementors§
Source§impl FidlCompatible<NodeTypes> for NodeType
Available on Fuchsia only.
impl FidlCompatible<NodeTypes> for NodeType
Available on Fuchsia only.
type FromError = ProtocolError
type IntoError = Infallible
Source§impl FidlCompatible<OptionOverloadValue> for Overload
Available on Fuchsia only.
impl FidlCompatible<OptionOverloadValue> for Overload
Available on Fuchsia only.
type FromError = Infallible
type IntoError = Infallible
Source§impl FidlCompatible<Option_> for DhcpOption
Available on Fuchsia only.
impl FidlCompatible<Option_> for DhcpOption
Available on Fuchsia only.