Enum GlibNoneOrInvalidError
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>
impl<I> Debug for GlibNoneOrInvalidError<I>
§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)>
Returns 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 for GlibNoneOrInvalidError<I>
impl<I> PartialEq for GlibNoneOrInvalidError<I>
impl<I> Eq for GlibNoneOrInvalidError<I>
impl<I> StructuralPartialEq for GlibNoneOrInvalidError<I>where
I: Error,
Auto Trait Implementations§
impl<I> Freeze for GlibNoneOrInvalidError<I>where
I: Freeze,
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> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.