pub enum GetGlobalError {
IsArray(String),
IsScalar(String),
SubscriptOutOfBounds(String),
}Expand description
Error returned when a global variable access encounters a type or shape mismatch.
This is distinct from a missing variable, which is represented by None in the
return value of get_global and get_global_array.
Variants§
IsArray(String)
The variable exists but is an array; use get_global_array instead.
IsScalar(String)
The variable exists but is a scalar; use get_global instead.
SubscriptOutOfBounds(String)
The array subscripts are out of bounds or invalid.
Trait Implementations§
Source§impl Debug for GetGlobalError
impl Debug for GetGlobalError
Source§impl Display for GetGlobalError
impl Display for GetGlobalError
Source§impl Error for GetGlobalError
impl Error for GetGlobalError
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()
Auto Trait Implementations§
impl Freeze for GetGlobalError
impl RefUnwindSafe for GetGlobalError
impl Send for GetGlobalError
impl Sync for GetGlobalError
impl Unpin for GetGlobalError
impl UnsafeUnpin for GetGlobalError
impl UnwindSafe for GetGlobalError
Blanket Implementations§
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