pub struct AssignReadOnlyError {
pub name: String,
pub new_value: Value,
pub read_only_location: Location,
pub vacancy: Option<Vacancy>,
}
Expand description
Error returned on assigning to a read-only variable
Fields§
§name: String
Name of the read-only variable
new_value: Value
Value that was being assigned
read_only_location: Location
Location where the variable was made read-only
vacancy: Option<Vacancy>
State of the variable before the assignment
If this assignment error occurred in a parameter expansion as in
${foo=bar}
or ${foo:=bar}
, this field is Some
, and the value is
the state of the variable before the assignment. In other cases, this
field is None
.
Trait Implementations§
Source§impl Clone for AssignReadOnlyError
impl Clone for AssignReadOnlyError
Source§fn clone(&self) -> AssignReadOnlyError
fn clone(&self) -> AssignReadOnlyError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AssignReadOnlyError
impl Debug for AssignReadOnlyError
Source§impl Display for AssignReadOnlyError
impl Display for AssignReadOnlyError
Source§impl Error for AssignReadOnlyError
impl Error for AssignReadOnlyError
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()
Source§impl From<AssignReadOnlyError> for ErrorCause
impl From<AssignReadOnlyError> for ErrorCause
Source§fn from(source: AssignReadOnlyError) -> Self
fn from(source: AssignReadOnlyError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AssignReadOnlyError
impl PartialEq for AssignReadOnlyError
impl Eq for AssignReadOnlyError
impl StructuralPartialEq for AssignReadOnlyError
Auto Trait Implementations§
impl Freeze for AssignReadOnlyError
impl !RefUnwindSafe for AssignReadOnlyError
impl !Send for AssignReadOnlyError
impl !Sync for AssignReadOnlyError
impl Unpin for AssignReadOnlyError
impl !UnwindSafe for AssignReadOnlyError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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