pub struct ExceptHandler {
pub exception_type: Option<ExprType>,
pub name: Option<String>,
pub body: Vec<Statement>,
pub lineno: Option<usize>,
pub col_offset: Option<usize>,
pub end_lineno: Option<usize>,
pub end_col_offset: Option<usize>,
}
Expand description
Exception handler (except clause)
Fields§
§exception_type: Option<ExprType>
The exception type to catch (None means catch all)
name: Option<String>
Variable name to bind the exception to (optional)
body: Vec<Statement>
Body of the except clause
lineno: Option<usize>
Position information
col_offset: Option<usize>
§end_lineno: Option<usize>
§end_col_offset: Option<usize>
Trait Implementations§
Source§impl Clone for ExceptHandler
impl Clone for ExceptHandler
Source§fn clone(&self) -> ExceptHandler
fn clone(&self) -> ExceptHandler
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 ExceptHandler
impl Debug for ExceptHandler
Source§impl<'de> Deserialize<'de> for ExceptHandler
impl<'de> Deserialize<'de> for ExceptHandler
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> FromPyObject<'a> for ExceptHandler
impl<'a> FromPyObject<'a> for ExceptHandler
Source§impl Node for ExceptHandler
impl Node for ExceptHandler
Source§fn lineno(&self) -> Option<usize>
fn lineno(&self) -> Option<usize>
A method for getting the starting line number of the node. This may not exist for all node types.
Source§fn col_offset(&self) -> Option<usize>
fn col_offset(&self) -> Option<usize>
A method for getting the starting column of the node. This may not exist for all node types.
Source§fn end_lineno(&self) -> Option<usize>
fn end_lineno(&self) -> Option<usize>
A method for getting the ending line number of the node. This may not exist for all node types.
Source§fn end_col_offset(&self) -> Option<usize>
fn end_col_offset(&self) -> Option<usize>
A method for getting the ending column of the node. This may not exist for all node types.
Source§impl PartialEq for ExceptHandler
impl PartialEq for ExceptHandler
Source§impl Serialize for ExceptHandler
impl Serialize for ExceptHandler
impl StructuralPartialEq for ExceptHandler
Auto Trait Implementations§
impl Freeze for ExceptHandler
impl RefUnwindSafe for ExceptHandler
impl Send for ExceptHandler
impl Sync for ExceptHandler
impl Unpin for ExceptHandler
impl UnwindSafe for ExceptHandler
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> ErrorContext for Twhere
T: Debug,
impl<T> ErrorContext for Twhere
T: Debug,
Source§fn with_context(&self, operation: &str) -> String
fn with_context(&self, operation: &str) -> String
Generate a standardized error message with context.