pub enum GlibNoneOrInvalidError<I>where
I: Error,{
Invalid(I),
None,
}
Expand description
Error type for TryFromGlib
when the Glib value can be None or invalid.
Variants§
Implementations§
§impl<I> GlibNoneOrInvalidError<I>where
I: Error,
impl<I> GlibNoneOrInvalidError<I>where I: Error,
pub fn none() -> GlibNoneOrInvalidError<I>
pub fn none() -> GlibNoneOrInvalidError<I>
Builds the None
variant.
pub fn is_invalid(&self) -> bool
pub fn is_invalid(&self) -> bool
Returns true
if self
is the Invalid
variant.
Trait Implementations§
§impl<I> Debug for GlibNoneOrInvalidError<I>where
I: Debug + Error,
impl<I> Debug for GlibNoneOrInvalidError<I>where I: Debug + Error,
§impl<I> Display for GlibNoneOrInvalidError<I>where
I: Error,
impl<I> Display for GlibNoneOrInvalidError<I>where I: Error,
§impl<I> Error for GlibNoneOrInvalidError<I>where
I: Error,
impl<I> Error for GlibNoneOrInvalidError<I>where I: Error,
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
§impl<I> From<I> for GlibNoneOrInvalidError<I>where
I: Error,
impl<I> From<I> for GlibNoneOrInvalidError<I>where I: Error,
§fn from(invalid: I) -> GlibNoneOrInvalidError<I>
fn from(invalid: I) -> GlibNoneOrInvalidError<I>
Converts to this type from the input type.
§impl<I> PartialEq<GlibNoneOrInvalidError<I>> for GlibNoneOrInvalidError<I>where
I: PartialEq<I> + Error,
impl<I> PartialEq<GlibNoneOrInvalidError<I>> for GlibNoneOrInvalidError<I>where I: PartialEq<I> + Error,
§fn eq(&self, other: &GlibNoneOrInvalidError<I>) -> bool
fn eq(&self, other: &GlibNoneOrInvalidError<I>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<I> Eq for GlibNoneOrInvalidError<I>where I: Eq + Error,
impl<I> StructuralEq for GlibNoneOrInvalidError<I>where I: Error,
impl<I> StructuralPartialEq for GlibNoneOrInvalidError<I>where I: Error,
Auto Trait Implementations§
impl<I> RefUnwindSafe for GlibNoneOrInvalidError<I>where I: RefUnwindSafe,
impl<I> Send for GlibNoneOrInvalidError<I>where I: Send,
impl<I> Sync for GlibNoneOrInvalidError<I>where I: Sync,
impl<I> Unpin for GlibNoneOrInvalidError<I>where I: Unpin,
impl<I> UnwindSafe for GlibNoneOrInvalidError<I>where I: UnwindSafe,
Blanket Implementations§
§impl<T> FromFd for Twhere
T: From<OwnedFd>,
impl<T> FromFd for Twhere T: From<OwnedFd>,
§impl<T> FromFilelike for Twhere
T: From<OwnedFd>,
impl<T> FromFilelike for Twhere T: From<OwnedFd>,
§fn from_filelike(owned: OwnedFd) -> T
fn from_filelike(owned: OwnedFd) -> T
Constructs a new instance of
Self
from the given filelike object. Read more§fn from_into_filelike<Owned>(owned: Owned) -> Twhere
Owned: IntoFilelike,
fn from_into_filelike<Owned>(owned: Owned) -> Twhere Owned: IntoFilelike,
Constructs a new instance of
Self
from the given filelike object
converted from into_owned
. Read more§impl<T> FromSocketlike for Twhere
T: From<OwnedFd>,
impl<T> FromSocketlike for Twhere T: From<OwnedFd>,
§fn from_socketlike(owned: OwnedFd) -> T
fn from_socketlike(owned: OwnedFd) -> T
Constructs a new instance of
Self
from the given socketlike object.§fn from_into_socketlike<Owned>(owned: Owned) -> Twhere
Owned: IntoSocketlike,
fn from_into_socketlike<Owned>(owned: Owned) -> Twhere Owned: IntoSocketlike,
Constructs a new instance of
Self
from the given socketlike object
converted from into_owned
.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.