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§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§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.