Trait TryFromGlib

pub trait TryFromGlib<G>: Sized
where G: Copy,
{ type Error; // Required method unsafe fn try_from_glib(val: G) -> Result<Self, Self::Error>; }
Expand description

Translate from a Glib type which can result in an undefined and/or invalid value.

Required Associated Types§

type Error

Required Methods§

unsafe fn try_from_glib(val: G) -> Result<Self, Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl TryFromGlib<i32> for Layer

§

type Error = GlibNoneError

§

unsafe fn try_from_glib( value: i32, ) -> Result<Layer, <Layer as TryFromGlib<i32>>::Error>

§

impl TryFromGlib<u64> for CancelledHandlerId

§

type Error = GlibNoneError

§

unsafe fn try_from_glib(val: u64) -> Result<CancelledHandlerId, GlibNoneError>

Implementors§