Skip to main content

FidlCompatible

Trait FidlCompatible 

Source
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§

Source

fn try_from_fidl(fidl: F) -> Result<Self, Self::FromError>

Source

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.
Source§

type FromError = Infallible

Source§

type IntoError = Infallible

Source§

fn try_from_fidl(fidl: Ipv4Address) -> Result<Self, Self::FromError>

Source§

fn try_into_fidl(self) -> Result<Ipv4Address, Self::IntoError>

Source§

impl FidlCompatible<Vec<Ipv4Address>> for Vec<Ipv4Addr>

Available on Fuchsia only.
Source§

type FromError = Infallible

Source§

type IntoError = Infallible

Source§

fn try_from_fidl(fidl: Vec<Ipv4Address>) -> Result<Self, Self::FromError>

Source§

fn try_into_fidl(self) -> Result<Vec<Ipv4Address>, Self::IntoError>

Implementors§

Source§

impl FidlCompatible<NodeTypes> for NodeType

Available on Fuchsia only.
Source§

impl FidlCompatible<OptionOverloadValue> for Overload

Available on Fuchsia only.
Source§

impl FidlCompatible<Option_> for DhcpOption

Available on Fuchsia only.