//! This is a generated file. Don't modify it by hand! Run `scripts/generate.py` to re-generate the file. use crate::context::PyFormatContext; use crate::{AsFormat, FormatNodeRule, IntoFormat}; use ruff_formatter::formatter::Formatter; use ruff_formatter::{FormatOwnedWithRule, FormatRefWithRule, FormatResult, FormatRule}; use rustpython_parser::ast; impl FormatRule> for crate::module::mod_module::FormatModModule { #[inline] fn fmt( &self, node: &ast::ModModule, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ModModule { type Format<'a> = FormatRefWithRule< 'a, ast::ModModule, crate::module::mod_module::FormatModModule, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::module::mod_module::FormatModModule::default()) } } impl<'ast> IntoFormat> for ast::ModModule { type Format = FormatOwnedWithRule< ast::ModModule, crate::module::mod_module::FormatModModule, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::module::mod_module::FormatModModule::default()) } } impl FormatRule> for crate::module::mod_interactive::FormatModInteractive { #[inline] fn fmt( &self, node: &ast::ModInteractive, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ModInteractive { type Format<'a> = FormatRefWithRule< 'a, ast::ModInteractive, crate::module::mod_interactive::FormatModInteractive, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::module::mod_interactive::FormatModInteractive::default(), ) } } impl<'ast> IntoFormat> for ast::ModInteractive { type Format = FormatOwnedWithRule< ast::ModInteractive, crate::module::mod_interactive::FormatModInteractive, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::module::mod_interactive::FormatModInteractive::default(), ) } } impl FormatRule> for crate::module::mod_expression::FormatModExpression { #[inline] fn fmt( &self, node: &ast::ModExpression, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ModExpression { type Format<'a> = FormatRefWithRule< 'a, ast::ModExpression, crate::module::mod_expression::FormatModExpression, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::module::mod_expression::FormatModExpression::default(), ) } } impl<'ast> IntoFormat> for ast::ModExpression { type Format = FormatOwnedWithRule< ast::ModExpression, crate::module::mod_expression::FormatModExpression, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::module::mod_expression::FormatModExpression::default(), ) } } impl FormatRule> for crate::module::mod_function_type::FormatModFunctionType { #[inline] fn fmt( &self, node: &ast::ModFunctionType, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ModFunctionType { type Format<'a> = FormatRefWithRule< 'a, ast::ModFunctionType, crate::module::mod_function_type::FormatModFunctionType, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::module::mod_function_type::FormatModFunctionType::default(), ) } } impl<'ast> IntoFormat> for ast::ModFunctionType { type Format = FormatOwnedWithRule< ast::ModFunctionType, crate::module::mod_function_type::FormatModFunctionType, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::module::mod_function_type::FormatModFunctionType::default(), ) } } impl FormatRule> for crate::statement::stmt_function_def::FormatStmtFunctionDef { #[inline] fn fmt( &self, node: &ast::StmtFunctionDef, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtFunctionDef { type Format<'a> = FormatRefWithRule< 'a, ast::StmtFunctionDef, crate::statement::stmt_function_def::FormatStmtFunctionDef, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_function_def::FormatStmtFunctionDef::default(), ) } } impl<'ast> IntoFormat> for ast::StmtFunctionDef { type Format = FormatOwnedWithRule< ast::StmtFunctionDef, crate::statement::stmt_function_def::FormatStmtFunctionDef, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_function_def::FormatStmtFunctionDef::default(), ) } } impl FormatRule> for crate::statement::stmt_async_function_def::FormatStmtAsyncFunctionDef { #[inline] fn fmt( &self, node: &ast::StmtAsyncFunctionDef, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtAsyncFunctionDef { type Format<'a> = FormatRefWithRule< 'a, ast::StmtAsyncFunctionDef, crate::statement::stmt_async_function_def::FormatStmtAsyncFunctionDef, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_async_function_def::FormatStmtAsyncFunctionDef::default(), ) } } impl<'ast> IntoFormat> for ast::StmtAsyncFunctionDef { type Format = FormatOwnedWithRule< ast::StmtAsyncFunctionDef, crate::statement::stmt_async_function_def::FormatStmtAsyncFunctionDef, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_async_function_def::FormatStmtAsyncFunctionDef::default(), ) } } impl FormatRule> for crate::statement::stmt_class_def::FormatStmtClassDef { #[inline] fn fmt( &self, node: &ast::StmtClassDef, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtClassDef { type Format<'a> = FormatRefWithRule< 'a, ast::StmtClassDef, crate::statement::stmt_class_def::FormatStmtClassDef, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_class_def::FormatStmtClassDef::default(), ) } } impl<'ast> IntoFormat> for ast::StmtClassDef { type Format = FormatOwnedWithRule< ast::StmtClassDef, crate::statement::stmt_class_def::FormatStmtClassDef, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_class_def::FormatStmtClassDef::default(), ) } } impl FormatRule> for crate::statement::stmt_return::FormatStmtReturn { #[inline] fn fmt( &self, node: &ast::StmtReturn, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtReturn { type Format<'a> = FormatRefWithRule< 'a, ast::StmtReturn, crate::statement::stmt_return::FormatStmtReturn, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_return::FormatStmtReturn::default(), ) } } impl<'ast> IntoFormat> for ast::StmtReturn { type Format = FormatOwnedWithRule< ast::StmtReturn, crate::statement::stmt_return::FormatStmtReturn, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_return::FormatStmtReturn::default(), ) } } impl FormatRule> for crate::statement::stmt_delete::FormatStmtDelete { #[inline] fn fmt( &self, node: &ast::StmtDelete, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtDelete { type Format<'a> = FormatRefWithRule< 'a, ast::StmtDelete, crate::statement::stmt_delete::FormatStmtDelete, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_delete::FormatStmtDelete::default(), ) } } impl<'ast> IntoFormat> for ast::StmtDelete { type Format = FormatOwnedWithRule< ast::StmtDelete, crate::statement::stmt_delete::FormatStmtDelete, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_delete::FormatStmtDelete::default(), ) } } impl FormatRule> for crate::statement::stmt_assign::FormatStmtAssign { #[inline] fn fmt( &self, node: &ast::StmtAssign, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtAssign { type Format<'a> = FormatRefWithRule< 'a, ast::StmtAssign, crate::statement::stmt_assign::FormatStmtAssign, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_assign::FormatStmtAssign::default(), ) } } impl<'ast> IntoFormat> for ast::StmtAssign { type Format = FormatOwnedWithRule< ast::StmtAssign, crate::statement::stmt_assign::FormatStmtAssign, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_assign::FormatStmtAssign::default(), ) } } impl FormatRule> for crate::statement::stmt_aug_assign::FormatStmtAugAssign { #[inline] fn fmt( &self, node: &ast::StmtAugAssign, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtAugAssign { type Format<'a> = FormatRefWithRule< 'a, ast::StmtAugAssign, crate::statement::stmt_aug_assign::FormatStmtAugAssign, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_aug_assign::FormatStmtAugAssign::default(), ) } } impl<'ast> IntoFormat> for ast::StmtAugAssign { type Format = FormatOwnedWithRule< ast::StmtAugAssign, crate::statement::stmt_aug_assign::FormatStmtAugAssign, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_aug_assign::FormatStmtAugAssign::default(), ) } } impl FormatRule> for crate::statement::stmt_ann_assign::FormatStmtAnnAssign { #[inline] fn fmt( &self, node: &ast::StmtAnnAssign, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtAnnAssign { type Format<'a> = FormatRefWithRule< 'a, ast::StmtAnnAssign, crate::statement::stmt_ann_assign::FormatStmtAnnAssign, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_ann_assign::FormatStmtAnnAssign::default(), ) } } impl<'ast> IntoFormat> for ast::StmtAnnAssign { type Format = FormatOwnedWithRule< ast::StmtAnnAssign, crate::statement::stmt_ann_assign::FormatStmtAnnAssign, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_ann_assign::FormatStmtAnnAssign::default(), ) } } impl FormatRule> for crate::statement::stmt_for::FormatStmtFor { #[inline] fn fmt(&self, node: &ast::StmtFor, f: &mut Formatter>) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtFor { type Format<'a> = FormatRefWithRule< 'a, ast::StmtFor, crate::statement::stmt_for::FormatStmtFor, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::statement::stmt_for::FormatStmtFor::default()) } } impl<'ast> IntoFormat> for ast::StmtFor { type Format = FormatOwnedWithRule< ast::StmtFor, crate::statement::stmt_for::FormatStmtFor, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::statement::stmt_for::FormatStmtFor::default()) } } impl FormatRule> for crate::statement::stmt_async_for::FormatStmtAsyncFor { #[inline] fn fmt( &self, node: &ast::StmtAsyncFor, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtAsyncFor { type Format<'a> = FormatRefWithRule< 'a, ast::StmtAsyncFor, crate::statement::stmt_async_for::FormatStmtAsyncFor, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_async_for::FormatStmtAsyncFor::default(), ) } } impl<'ast> IntoFormat> for ast::StmtAsyncFor { type Format = FormatOwnedWithRule< ast::StmtAsyncFor, crate::statement::stmt_async_for::FormatStmtAsyncFor, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_async_for::FormatStmtAsyncFor::default(), ) } } impl FormatRule> for crate::statement::stmt_while::FormatStmtWhile { #[inline] fn fmt( &self, node: &ast::StmtWhile, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtWhile { type Format<'a> = FormatRefWithRule< 'a, ast::StmtWhile, crate::statement::stmt_while::FormatStmtWhile, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_while::FormatStmtWhile::default(), ) } } impl<'ast> IntoFormat> for ast::StmtWhile { type Format = FormatOwnedWithRule< ast::StmtWhile, crate::statement::stmt_while::FormatStmtWhile, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_while::FormatStmtWhile::default(), ) } } impl FormatRule> for crate::statement::stmt_if::FormatStmtIf { #[inline] fn fmt(&self, node: &ast::StmtIf, f: &mut Formatter>) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtIf { type Format<'a> = FormatRefWithRule< 'a, ast::StmtIf, crate::statement::stmt_if::FormatStmtIf, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::statement::stmt_if::FormatStmtIf::default()) } } impl<'ast> IntoFormat> for ast::StmtIf { type Format = FormatOwnedWithRule< ast::StmtIf, crate::statement::stmt_if::FormatStmtIf, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::statement::stmt_if::FormatStmtIf::default()) } } impl FormatRule> for crate::statement::stmt_with::FormatStmtWith { #[inline] fn fmt( &self, node: &ast::StmtWith, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtWith { type Format<'a> = FormatRefWithRule< 'a, ast::StmtWith, crate::statement::stmt_with::FormatStmtWith, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::statement::stmt_with::FormatStmtWith::default()) } } impl<'ast> IntoFormat> for ast::StmtWith { type Format = FormatOwnedWithRule< ast::StmtWith, crate::statement::stmt_with::FormatStmtWith, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::statement::stmt_with::FormatStmtWith::default()) } } impl FormatRule> for crate::statement::stmt_async_with::FormatStmtAsyncWith { #[inline] fn fmt( &self, node: &ast::StmtAsyncWith, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtAsyncWith { type Format<'a> = FormatRefWithRule< 'a, ast::StmtAsyncWith, crate::statement::stmt_async_with::FormatStmtAsyncWith, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_async_with::FormatStmtAsyncWith::default(), ) } } impl<'ast> IntoFormat> for ast::StmtAsyncWith { type Format = FormatOwnedWithRule< ast::StmtAsyncWith, crate::statement::stmt_async_with::FormatStmtAsyncWith, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_async_with::FormatStmtAsyncWith::default(), ) } } impl FormatRule> for crate::statement::stmt_match::FormatStmtMatch { #[inline] fn fmt( &self, node: &ast::StmtMatch, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtMatch { type Format<'a> = FormatRefWithRule< 'a, ast::StmtMatch, crate::statement::stmt_match::FormatStmtMatch, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_match::FormatStmtMatch::default(), ) } } impl<'ast> IntoFormat> for ast::StmtMatch { type Format = FormatOwnedWithRule< ast::StmtMatch, crate::statement::stmt_match::FormatStmtMatch, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_match::FormatStmtMatch::default(), ) } } impl FormatRule> for crate::statement::stmt_raise::FormatStmtRaise { #[inline] fn fmt( &self, node: &ast::StmtRaise, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtRaise { type Format<'a> = FormatRefWithRule< 'a, ast::StmtRaise, crate::statement::stmt_raise::FormatStmtRaise, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_raise::FormatStmtRaise::default(), ) } } impl<'ast> IntoFormat> for ast::StmtRaise { type Format = FormatOwnedWithRule< ast::StmtRaise, crate::statement::stmt_raise::FormatStmtRaise, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_raise::FormatStmtRaise::default(), ) } } impl FormatRule> for crate::statement::stmt_try::FormatStmtTry { #[inline] fn fmt(&self, node: &ast::StmtTry, f: &mut Formatter>) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtTry { type Format<'a> = FormatRefWithRule< 'a, ast::StmtTry, crate::statement::stmt_try::FormatStmtTry, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::statement::stmt_try::FormatStmtTry::default()) } } impl<'ast> IntoFormat> for ast::StmtTry { type Format = FormatOwnedWithRule< ast::StmtTry, crate::statement::stmt_try::FormatStmtTry, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::statement::stmt_try::FormatStmtTry::default()) } } impl FormatRule> for crate::statement::stmt_try_star::FormatStmtTryStar { #[inline] fn fmt( &self, node: &ast::StmtTryStar, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtTryStar { type Format<'a> = FormatRefWithRule< 'a, ast::StmtTryStar, crate::statement::stmt_try_star::FormatStmtTryStar, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_try_star::FormatStmtTryStar::default(), ) } } impl<'ast> IntoFormat> for ast::StmtTryStar { type Format = FormatOwnedWithRule< ast::StmtTryStar, crate::statement::stmt_try_star::FormatStmtTryStar, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_try_star::FormatStmtTryStar::default(), ) } } impl FormatRule> for crate::statement::stmt_assert::FormatStmtAssert { #[inline] fn fmt( &self, node: &ast::StmtAssert, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtAssert { type Format<'a> = FormatRefWithRule< 'a, ast::StmtAssert, crate::statement::stmt_assert::FormatStmtAssert, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_assert::FormatStmtAssert::default(), ) } } impl<'ast> IntoFormat> for ast::StmtAssert { type Format = FormatOwnedWithRule< ast::StmtAssert, crate::statement::stmt_assert::FormatStmtAssert, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_assert::FormatStmtAssert::default(), ) } } impl FormatRule> for crate::statement::stmt_import::FormatStmtImport { #[inline] fn fmt( &self, node: &ast::StmtImport, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtImport { type Format<'a> = FormatRefWithRule< 'a, ast::StmtImport, crate::statement::stmt_import::FormatStmtImport, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_import::FormatStmtImport::default(), ) } } impl<'ast> IntoFormat> for ast::StmtImport { type Format = FormatOwnedWithRule< ast::StmtImport, crate::statement::stmt_import::FormatStmtImport, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_import::FormatStmtImport::default(), ) } } impl FormatRule> for crate::statement::stmt_import_from::FormatStmtImportFrom { #[inline] fn fmt( &self, node: &ast::StmtImportFrom, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtImportFrom { type Format<'a> = FormatRefWithRule< 'a, ast::StmtImportFrom, crate::statement::stmt_import_from::FormatStmtImportFrom, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_import_from::FormatStmtImportFrom::default(), ) } } impl<'ast> IntoFormat> for ast::StmtImportFrom { type Format = FormatOwnedWithRule< ast::StmtImportFrom, crate::statement::stmt_import_from::FormatStmtImportFrom, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_import_from::FormatStmtImportFrom::default(), ) } } impl FormatRule> for crate::statement::stmt_global::FormatStmtGlobal { #[inline] fn fmt( &self, node: &ast::StmtGlobal, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtGlobal { type Format<'a> = FormatRefWithRule< 'a, ast::StmtGlobal, crate::statement::stmt_global::FormatStmtGlobal, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_global::FormatStmtGlobal::default(), ) } } impl<'ast> IntoFormat> for ast::StmtGlobal { type Format = FormatOwnedWithRule< ast::StmtGlobal, crate::statement::stmt_global::FormatStmtGlobal, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_global::FormatStmtGlobal::default(), ) } } impl FormatRule> for crate::statement::stmt_nonlocal::FormatStmtNonlocal { #[inline] fn fmt( &self, node: &ast::StmtNonlocal, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtNonlocal { type Format<'a> = FormatRefWithRule< 'a, ast::StmtNonlocal, crate::statement::stmt_nonlocal::FormatStmtNonlocal, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_nonlocal::FormatStmtNonlocal::default(), ) } } impl<'ast> IntoFormat> for ast::StmtNonlocal { type Format = FormatOwnedWithRule< ast::StmtNonlocal, crate::statement::stmt_nonlocal::FormatStmtNonlocal, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_nonlocal::FormatStmtNonlocal::default(), ) } } impl FormatRule> for crate::statement::stmt_expr::FormatStmtExpr { #[inline] fn fmt( &self, node: &ast::StmtExpr, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtExpr { type Format<'a> = FormatRefWithRule< 'a, ast::StmtExpr, crate::statement::stmt_expr::FormatStmtExpr, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::statement::stmt_expr::FormatStmtExpr::default()) } } impl<'ast> IntoFormat> for ast::StmtExpr { type Format = FormatOwnedWithRule< ast::StmtExpr, crate::statement::stmt_expr::FormatStmtExpr, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::statement::stmt_expr::FormatStmtExpr::default()) } } impl FormatRule> for crate::statement::stmt_pass::FormatStmtPass { #[inline] fn fmt( &self, node: &ast::StmtPass, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtPass { type Format<'a> = FormatRefWithRule< 'a, ast::StmtPass, crate::statement::stmt_pass::FormatStmtPass, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::statement::stmt_pass::FormatStmtPass::default()) } } impl<'ast> IntoFormat> for ast::StmtPass { type Format = FormatOwnedWithRule< ast::StmtPass, crate::statement::stmt_pass::FormatStmtPass, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::statement::stmt_pass::FormatStmtPass::default()) } } impl FormatRule> for crate::statement::stmt_break::FormatStmtBreak { #[inline] fn fmt( &self, node: &ast::StmtBreak, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtBreak { type Format<'a> = FormatRefWithRule< 'a, ast::StmtBreak, crate::statement::stmt_break::FormatStmtBreak, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_break::FormatStmtBreak::default(), ) } } impl<'ast> IntoFormat> for ast::StmtBreak { type Format = FormatOwnedWithRule< ast::StmtBreak, crate::statement::stmt_break::FormatStmtBreak, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_break::FormatStmtBreak::default(), ) } } impl FormatRule> for crate::statement::stmt_continue::FormatStmtContinue { #[inline] fn fmt( &self, node: &ast::StmtContinue, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::StmtContinue { type Format<'a> = FormatRefWithRule< 'a, ast::StmtContinue, crate::statement::stmt_continue::FormatStmtContinue, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::statement::stmt_continue::FormatStmtContinue::default(), ) } } impl<'ast> IntoFormat> for ast::StmtContinue { type Format = FormatOwnedWithRule< ast::StmtContinue, crate::statement::stmt_continue::FormatStmtContinue, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::statement::stmt_continue::FormatStmtContinue::default(), ) } } impl FormatRule> for crate::expression::expr_bool_op::FormatExprBoolOp { #[inline] fn fmt( &self, node: &ast::ExprBoolOp, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprBoolOp { type Format<'a> = FormatRefWithRule< 'a, ast::ExprBoolOp, crate::expression::expr_bool_op::FormatExprBoolOp, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_bool_op::FormatExprBoolOp::default(), ) } } impl<'ast> IntoFormat> for ast::ExprBoolOp { type Format = FormatOwnedWithRule< ast::ExprBoolOp, crate::expression::expr_bool_op::FormatExprBoolOp, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_bool_op::FormatExprBoolOp::default(), ) } } impl FormatRule> for crate::expression::expr_named_expr::FormatExprNamedExpr { #[inline] fn fmt( &self, node: &ast::ExprNamedExpr, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprNamedExpr { type Format<'a> = FormatRefWithRule< 'a, ast::ExprNamedExpr, crate::expression::expr_named_expr::FormatExprNamedExpr, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_named_expr::FormatExprNamedExpr::default(), ) } } impl<'ast> IntoFormat> for ast::ExprNamedExpr { type Format = FormatOwnedWithRule< ast::ExprNamedExpr, crate::expression::expr_named_expr::FormatExprNamedExpr, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_named_expr::FormatExprNamedExpr::default(), ) } } impl FormatRule> for crate::expression::expr_bin_op::FormatExprBinOp { #[inline] fn fmt( &self, node: &ast::ExprBinOp, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprBinOp { type Format<'a> = FormatRefWithRule< 'a, ast::ExprBinOp, crate::expression::expr_bin_op::FormatExprBinOp, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_bin_op::FormatExprBinOp::default(), ) } } impl<'ast> IntoFormat> for ast::ExprBinOp { type Format = FormatOwnedWithRule< ast::ExprBinOp, crate::expression::expr_bin_op::FormatExprBinOp, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_bin_op::FormatExprBinOp::default(), ) } } impl FormatRule> for crate::expression::expr_unary_op::FormatExprUnaryOp { #[inline] fn fmt( &self, node: &ast::ExprUnaryOp, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprUnaryOp { type Format<'a> = FormatRefWithRule< 'a, ast::ExprUnaryOp, crate::expression::expr_unary_op::FormatExprUnaryOp, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_unary_op::FormatExprUnaryOp::default(), ) } } impl<'ast> IntoFormat> for ast::ExprUnaryOp { type Format = FormatOwnedWithRule< ast::ExprUnaryOp, crate::expression::expr_unary_op::FormatExprUnaryOp, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_unary_op::FormatExprUnaryOp::default(), ) } } impl FormatRule> for crate::expression::expr_lambda::FormatExprLambda { #[inline] fn fmt( &self, node: &ast::ExprLambda, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprLambda { type Format<'a> = FormatRefWithRule< 'a, ast::ExprLambda, crate::expression::expr_lambda::FormatExprLambda, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_lambda::FormatExprLambda::default(), ) } } impl<'ast> IntoFormat> for ast::ExprLambda { type Format = FormatOwnedWithRule< ast::ExprLambda, crate::expression::expr_lambda::FormatExprLambda, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_lambda::FormatExprLambda::default(), ) } } impl FormatRule> for crate::expression::expr_if_exp::FormatExprIfExp { #[inline] fn fmt( &self, node: &ast::ExprIfExp, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprIfExp { type Format<'a> = FormatRefWithRule< 'a, ast::ExprIfExp, crate::expression::expr_if_exp::FormatExprIfExp, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_if_exp::FormatExprIfExp::default(), ) } } impl<'ast> IntoFormat> for ast::ExprIfExp { type Format = FormatOwnedWithRule< ast::ExprIfExp, crate::expression::expr_if_exp::FormatExprIfExp, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_if_exp::FormatExprIfExp::default(), ) } } impl FormatRule> for crate::expression::expr_dict::FormatExprDict { #[inline] fn fmt( &self, node: &ast::ExprDict, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprDict { type Format<'a> = FormatRefWithRule< 'a, ast::ExprDict, crate::expression::expr_dict::FormatExprDict, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_dict::FormatExprDict::default(), ) } } impl<'ast> IntoFormat> for ast::ExprDict { type Format = FormatOwnedWithRule< ast::ExprDict, crate::expression::expr_dict::FormatExprDict, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_dict::FormatExprDict::default(), ) } } impl FormatRule> for crate::expression::expr_set::FormatExprSet { #[inline] fn fmt(&self, node: &ast::ExprSet, f: &mut Formatter>) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprSet { type Format<'a> = FormatRefWithRule< 'a, ast::ExprSet, crate::expression::expr_set::FormatExprSet, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::expression::expr_set::FormatExprSet::default()) } } impl<'ast> IntoFormat> for ast::ExprSet { type Format = FormatOwnedWithRule< ast::ExprSet, crate::expression::expr_set::FormatExprSet, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::expression::expr_set::FormatExprSet::default()) } } impl FormatRule> for crate::expression::expr_list_comp::FormatExprListComp { #[inline] fn fmt( &self, node: &ast::ExprListComp, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprListComp { type Format<'a> = FormatRefWithRule< 'a, ast::ExprListComp, crate::expression::expr_list_comp::FormatExprListComp, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_list_comp::FormatExprListComp::default(), ) } } impl<'ast> IntoFormat> for ast::ExprListComp { type Format = FormatOwnedWithRule< ast::ExprListComp, crate::expression::expr_list_comp::FormatExprListComp, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_list_comp::FormatExprListComp::default(), ) } } impl FormatRule> for crate::expression::expr_set_comp::FormatExprSetComp { #[inline] fn fmt( &self, node: &ast::ExprSetComp, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprSetComp { type Format<'a> = FormatRefWithRule< 'a, ast::ExprSetComp, crate::expression::expr_set_comp::FormatExprSetComp, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_set_comp::FormatExprSetComp::default(), ) } } impl<'ast> IntoFormat> for ast::ExprSetComp { type Format = FormatOwnedWithRule< ast::ExprSetComp, crate::expression::expr_set_comp::FormatExprSetComp, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_set_comp::FormatExprSetComp::default(), ) } } impl FormatRule> for crate::expression::expr_dict_comp::FormatExprDictComp { #[inline] fn fmt( &self, node: &ast::ExprDictComp, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprDictComp { type Format<'a> = FormatRefWithRule< 'a, ast::ExprDictComp, crate::expression::expr_dict_comp::FormatExprDictComp, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_dict_comp::FormatExprDictComp::default(), ) } } impl<'ast> IntoFormat> for ast::ExprDictComp { type Format = FormatOwnedWithRule< ast::ExprDictComp, crate::expression::expr_dict_comp::FormatExprDictComp, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_dict_comp::FormatExprDictComp::default(), ) } } impl FormatRule> for crate::expression::expr_generator_exp::FormatExprGeneratorExp { #[inline] fn fmt( &self, node: &ast::ExprGeneratorExp, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprGeneratorExp { type Format<'a> = FormatRefWithRule< 'a, ast::ExprGeneratorExp, crate::expression::expr_generator_exp::FormatExprGeneratorExp, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_generator_exp::FormatExprGeneratorExp::default(), ) } } impl<'ast> IntoFormat> for ast::ExprGeneratorExp { type Format = FormatOwnedWithRule< ast::ExprGeneratorExp, crate::expression::expr_generator_exp::FormatExprGeneratorExp, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_generator_exp::FormatExprGeneratorExp::default(), ) } } impl FormatRule> for crate::expression::expr_await::FormatExprAwait { #[inline] fn fmt( &self, node: &ast::ExprAwait, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprAwait { type Format<'a> = FormatRefWithRule< 'a, ast::ExprAwait, crate::expression::expr_await::FormatExprAwait, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_await::FormatExprAwait::default(), ) } } impl<'ast> IntoFormat> for ast::ExprAwait { type Format = FormatOwnedWithRule< ast::ExprAwait, crate::expression::expr_await::FormatExprAwait, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_await::FormatExprAwait::default(), ) } } impl FormatRule> for crate::expression::expr_yield::FormatExprYield { #[inline] fn fmt( &self, node: &ast::ExprYield, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprYield { type Format<'a> = FormatRefWithRule< 'a, ast::ExprYield, crate::expression::expr_yield::FormatExprYield, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_yield::FormatExprYield::default(), ) } } impl<'ast> IntoFormat> for ast::ExprYield { type Format = FormatOwnedWithRule< ast::ExprYield, crate::expression::expr_yield::FormatExprYield, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_yield::FormatExprYield::default(), ) } } impl FormatRule> for crate::expression::expr_yield_from::FormatExprYieldFrom { #[inline] fn fmt( &self, node: &ast::ExprYieldFrom, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprYieldFrom { type Format<'a> = FormatRefWithRule< 'a, ast::ExprYieldFrom, crate::expression::expr_yield_from::FormatExprYieldFrom, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_yield_from::FormatExprYieldFrom::default(), ) } } impl<'ast> IntoFormat> for ast::ExprYieldFrom { type Format = FormatOwnedWithRule< ast::ExprYieldFrom, crate::expression::expr_yield_from::FormatExprYieldFrom, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_yield_from::FormatExprYieldFrom::default(), ) } } impl FormatRule> for crate::expression::expr_compare::FormatExprCompare { #[inline] fn fmt( &self, node: &ast::ExprCompare, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprCompare { type Format<'a> = FormatRefWithRule< 'a, ast::ExprCompare, crate::expression::expr_compare::FormatExprCompare, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_compare::FormatExprCompare::default(), ) } } impl<'ast> IntoFormat> for ast::ExprCompare { type Format = FormatOwnedWithRule< ast::ExprCompare, crate::expression::expr_compare::FormatExprCompare, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_compare::FormatExprCompare::default(), ) } } impl FormatRule> for crate::expression::expr_call::FormatExprCall { #[inline] fn fmt( &self, node: &ast::ExprCall, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprCall { type Format<'a> = FormatRefWithRule< 'a, ast::ExprCall, crate::expression::expr_call::FormatExprCall, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_call::FormatExprCall::default(), ) } } impl<'ast> IntoFormat> for ast::ExprCall { type Format = FormatOwnedWithRule< ast::ExprCall, crate::expression::expr_call::FormatExprCall, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_call::FormatExprCall::default(), ) } } impl FormatRule> for crate::expression::expr_formatted_value::FormatExprFormattedValue { #[inline] fn fmt( &self, node: &ast::ExprFormattedValue, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprFormattedValue { type Format<'a> = FormatRefWithRule< 'a, ast::ExprFormattedValue, crate::expression::expr_formatted_value::FormatExprFormattedValue, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_formatted_value::FormatExprFormattedValue::default(), ) } } impl<'ast> IntoFormat> for ast::ExprFormattedValue { type Format = FormatOwnedWithRule< ast::ExprFormattedValue, crate::expression::expr_formatted_value::FormatExprFormattedValue, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_formatted_value::FormatExprFormattedValue::default(), ) } } impl FormatRule> for crate::expression::expr_joined_str::FormatExprJoinedStr { #[inline] fn fmt( &self, node: &ast::ExprJoinedStr, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprJoinedStr { type Format<'a> = FormatRefWithRule< 'a, ast::ExprJoinedStr, crate::expression::expr_joined_str::FormatExprJoinedStr, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_joined_str::FormatExprJoinedStr::default(), ) } } impl<'ast> IntoFormat> for ast::ExprJoinedStr { type Format = FormatOwnedWithRule< ast::ExprJoinedStr, crate::expression::expr_joined_str::FormatExprJoinedStr, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_joined_str::FormatExprJoinedStr::default(), ) } } impl FormatRule> for crate::expression::expr_constant::FormatExprConstant { #[inline] fn fmt( &self, node: &ast::ExprConstant, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprConstant { type Format<'a> = FormatRefWithRule< 'a, ast::ExprConstant, crate::expression::expr_constant::FormatExprConstant, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_constant::FormatExprConstant::default(), ) } } impl<'ast> IntoFormat> for ast::ExprConstant { type Format = FormatOwnedWithRule< ast::ExprConstant, crate::expression::expr_constant::FormatExprConstant, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_constant::FormatExprConstant::default(), ) } } impl FormatRule> for crate::expression::expr_attribute::FormatExprAttribute { #[inline] fn fmt( &self, node: &ast::ExprAttribute, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprAttribute { type Format<'a> = FormatRefWithRule< 'a, ast::ExprAttribute, crate::expression::expr_attribute::FormatExprAttribute, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_attribute::FormatExprAttribute::default(), ) } } impl<'ast> IntoFormat> for ast::ExprAttribute { type Format = FormatOwnedWithRule< ast::ExprAttribute, crate::expression::expr_attribute::FormatExprAttribute, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_attribute::FormatExprAttribute::default(), ) } } impl FormatRule> for crate::expression::expr_subscript::FormatExprSubscript { #[inline] fn fmt( &self, node: &ast::ExprSubscript, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprSubscript { type Format<'a> = FormatRefWithRule< 'a, ast::ExprSubscript, crate::expression::expr_subscript::FormatExprSubscript, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_subscript::FormatExprSubscript::default(), ) } } impl<'ast> IntoFormat> for ast::ExprSubscript { type Format = FormatOwnedWithRule< ast::ExprSubscript, crate::expression::expr_subscript::FormatExprSubscript, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_subscript::FormatExprSubscript::default(), ) } } impl FormatRule> for crate::expression::expr_starred::FormatExprStarred { #[inline] fn fmt( &self, node: &ast::ExprStarred, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprStarred { type Format<'a> = FormatRefWithRule< 'a, ast::ExprStarred, crate::expression::expr_starred::FormatExprStarred, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_starred::FormatExprStarred::default(), ) } } impl<'ast> IntoFormat> for ast::ExprStarred { type Format = FormatOwnedWithRule< ast::ExprStarred, crate::expression::expr_starred::FormatExprStarred, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_starred::FormatExprStarred::default(), ) } } impl FormatRule> for crate::expression::expr_name::FormatExprName { #[inline] fn fmt( &self, node: &ast::ExprName, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprName { type Format<'a> = FormatRefWithRule< 'a, ast::ExprName, crate::expression::expr_name::FormatExprName, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_name::FormatExprName::default(), ) } } impl<'ast> IntoFormat> for ast::ExprName { type Format = FormatOwnedWithRule< ast::ExprName, crate::expression::expr_name::FormatExprName, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_name::FormatExprName::default(), ) } } impl FormatRule> for crate::expression::expr_list::FormatExprList { #[inline] fn fmt( &self, node: &ast::ExprList, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprList { type Format<'a> = FormatRefWithRule< 'a, ast::ExprList, crate::expression::expr_list::FormatExprList, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_list::FormatExprList::default(), ) } } impl<'ast> IntoFormat> for ast::ExprList { type Format = FormatOwnedWithRule< ast::ExprList, crate::expression::expr_list::FormatExprList, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_list::FormatExprList::default(), ) } } impl FormatRule> for crate::expression::expr_tuple::FormatExprTuple { #[inline] fn fmt( &self, node: &ast::ExprTuple, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprTuple { type Format<'a> = FormatRefWithRule< 'a, ast::ExprTuple, crate::expression::expr_tuple::FormatExprTuple, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_tuple::FormatExprTuple::default(), ) } } impl<'ast> IntoFormat> for ast::ExprTuple { type Format = FormatOwnedWithRule< ast::ExprTuple, crate::expression::expr_tuple::FormatExprTuple, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_tuple::FormatExprTuple::default(), ) } } impl FormatRule> for crate::expression::expr_slice::FormatExprSlice { #[inline] fn fmt( &self, node: &ast::ExprSlice, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExprSlice { type Format<'a> = FormatRefWithRule< 'a, ast::ExprSlice, crate::expression::expr_slice::FormatExprSlice, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::expression::expr_slice::FormatExprSlice::default(), ) } } impl<'ast> IntoFormat> for ast::ExprSlice { type Format = FormatOwnedWithRule< ast::ExprSlice, crate::expression::expr_slice::FormatExprSlice, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::expression::expr_slice::FormatExprSlice::default(), ) } } impl FormatRule> for crate::other::except_handler_except_handler::FormatExceptHandlerExceptHandler { #[inline] fn fmt( &self, node: &ast::ExceptHandlerExceptHandler, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ExceptHandlerExceptHandler { type Format<'a> = FormatRefWithRule< 'a, ast::ExceptHandlerExceptHandler, crate::other::except_handler_except_handler::FormatExceptHandlerExceptHandler, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::other::except_handler_except_handler::FormatExceptHandlerExceptHandler::default( ), ) } } impl<'ast> IntoFormat> for ast::ExceptHandlerExceptHandler { type Format = FormatOwnedWithRule< ast::ExceptHandlerExceptHandler, crate::other::except_handler_except_handler::FormatExceptHandlerExceptHandler, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::other::except_handler_except_handler::FormatExceptHandlerExceptHandler::default( ), ) } } impl FormatRule> for crate::pattern::pattern_match_value::FormatPatternMatchValue { #[inline] fn fmt( &self, node: &ast::PatternMatchValue, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::PatternMatchValue { type Format<'a> = FormatRefWithRule< 'a, ast::PatternMatchValue, crate::pattern::pattern_match_value::FormatPatternMatchValue, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::pattern::pattern_match_value::FormatPatternMatchValue::default(), ) } } impl<'ast> IntoFormat> for ast::PatternMatchValue { type Format = FormatOwnedWithRule< ast::PatternMatchValue, crate::pattern::pattern_match_value::FormatPatternMatchValue, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::pattern::pattern_match_value::FormatPatternMatchValue::default(), ) } } impl FormatRule> for crate::pattern::pattern_match_singleton::FormatPatternMatchSingleton { #[inline] fn fmt( &self, node: &ast::PatternMatchSingleton, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::PatternMatchSingleton { type Format<'a> = FormatRefWithRule< 'a, ast::PatternMatchSingleton, crate::pattern::pattern_match_singleton::FormatPatternMatchSingleton, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::pattern::pattern_match_singleton::FormatPatternMatchSingleton::default(), ) } } impl<'ast> IntoFormat> for ast::PatternMatchSingleton { type Format = FormatOwnedWithRule< ast::PatternMatchSingleton, crate::pattern::pattern_match_singleton::FormatPatternMatchSingleton, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::pattern::pattern_match_singleton::FormatPatternMatchSingleton::default(), ) } } impl FormatRule> for crate::pattern::pattern_match_sequence::FormatPatternMatchSequence { #[inline] fn fmt( &self, node: &ast::PatternMatchSequence, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::PatternMatchSequence { type Format<'a> = FormatRefWithRule< 'a, ast::PatternMatchSequence, crate::pattern::pattern_match_sequence::FormatPatternMatchSequence, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::pattern::pattern_match_sequence::FormatPatternMatchSequence::default(), ) } } impl<'ast> IntoFormat> for ast::PatternMatchSequence { type Format = FormatOwnedWithRule< ast::PatternMatchSequence, crate::pattern::pattern_match_sequence::FormatPatternMatchSequence, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::pattern::pattern_match_sequence::FormatPatternMatchSequence::default(), ) } } impl FormatRule> for crate::pattern::pattern_match_mapping::FormatPatternMatchMapping { #[inline] fn fmt( &self, node: &ast::PatternMatchMapping, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::PatternMatchMapping { type Format<'a> = FormatRefWithRule< 'a, ast::PatternMatchMapping, crate::pattern::pattern_match_mapping::FormatPatternMatchMapping, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::pattern::pattern_match_mapping::FormatPatternMatchMapping::default(), ) } } impl<'ast> IntoFormat> for ast::PatternMatchMapping { type Format = FormatOwnedWithRule< ast::PatternMatchMapping, crate::pattern::pattern_match_mapping::FormatPatternMatchMapping, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::pattern::pattern_match_mapping::FormatPatternMatchMapping::default(), ) } } impl FormatRule> for crate::pattern::pattern_match_class::FormatPatternMatchClass { #[inline] fn fmt( &self, node: &ast::PatternMatchClass, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::PatternMatchClass { type Format<'a> = FormatRefWithRule< 'a, ast::PatternMatchClass, crate::pattern::pattern_match_class::FormatPatternMatchClass, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::pattern::pattern_match_class::FormatPatternMatchClass::default(), ) } } impl<'ast> IntoFormat> for ast::PatternMatchClass { type Format = FormatOwnedWithRule< ast::PatternMatchClass, crate::pattern::pattern_match_class::FormatPatternMatchClass, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::pattern::pattern_match_class::FormatPatternMatchClass::default(), ) } } impl FormatRule> for crate::pattern::pattern_match_star::FormatPatternMatchStar { #[inline] fn fmt( &self, node: &ast::PatternMatchStar, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::PatternMatchStar { type Format<'a> = FormatRefWithRule< 'a, ast::PatternMatchStar, crate::pattern::pattern_match_star::FormatPatternMatchStar, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::pattern::pattern_match_star::FormatPatternMatchStar::default(), ) } } impl<'ast> IntoFormat> for ast::PatternMatchStar { type Format = FormatOwnedWithRule< ast::PatternMatchStar, crate::pattern::pattern_match_star::FormatPatternMatchStar, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::pattern::pattern_match_star::FormatPatternMatchStar::default(), ) } } impl FormatRule> for crate::pattern::pattern_match_as::FormatPatternMatchAs { #[inline] fn fmt( &self, node: &ast::PatternMatchAs, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::PatternMatchAs { type Format<'a> = FormatRefWithRule< 'a, ast::PatternMatchAs, crate::pattern::pattern_match_as::FormatPatternMatchAs, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::pattern::pattern_match_as::FormatPatternMatchAs::default(), ) } } impl<'ast> IntoFormat> for ast::PatternMatchAs { type Format = FormatOwnedWithRule< ast::PatternMatchAs, crate::pattern::pattern_match_as::FormatPatternMatchAs, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::pattern::pattern_match_as::FormatPatternMatchAs::default(), ) } } impl FormatRule> for crate::pattern::pattern_match_or::FormatPatternMatchOr { #[inline] fn fmt( &self, node: &ast::PatternMatchOr, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::PatternMatchOr { type Format<'a> = FormatRefWithRule< 'a, ast::PatternMatchOr, crate::pattern::pattern_match_or::FormatPatternMatchOr, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::pattern::pattern_match_or::FormatPatternMatchOr::default(), ) } } impl<'ast> IntoFormat> for ast::PatternMatchOr { type Format = FormatOwnedWithRule< ast::PatternMatchOr, crate::pattern::pattern_match_or::FormatPatternMatchOr, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::pattern::pattern_match_or::FormatPatternMatchOr::default(), ) } } impl FormatRule> for crate::other::type_ignore_type_ignore::FormatTypeIgnoreTypeIgnore { #[inline] fn fmt( &self, node: &ast::TypeIgnoreTypeIgnore, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::TypeIgnoreTypeIgnore { type Format<'a> = FormatRefWithRule< 'a, ast::TypeIgnoreTypeIgnore, crate::other::type_ignore_type_ignore::FormatTypeIgnoreTypeIgnore, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::other::type_ignore_type_ignore::FormatTypeIgnoreTypeIgnore::default(), ) } } impl<'ast> IntoFormat> for ast::TypeIgnoreTypeIgnore { type Format = FormatOwnedWithRule< ast::TypeIgnoreTypeIgnore, crate::other::type_ignore_type_ignore::FormatTypeIgnoreTypeIgnore, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::other::type_ignore_type_ignore::FormatTypeIgnoreTypeIgnore::default(), ) } } impl FormatRule> for crate::other::comprehension::FormatComprehension { #[inline] fn fmt( &self, node: &ast::Comprehension, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::Comprehension { type Format<'a> = FormatRefWithRule< 'a, ast::Comprehension, crate::other::comprehension::FormatComprehension, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::other::comprehension::FormatComprehension::default(), ) } } impl<'ast> IntoFormat> for ast::Comprehension { type Format = FormatOwnedWithRule< ast::Comprehension, crate::other::comprehension::FormatComprehension, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::other::comprehension::FormatComprehension::default(), ) } } impl FormatRule> for crate::other::arguments::FormatArguments { #[inline] fn fmt( &self, node: &ast::Arguments, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::Arguments { type Format<'a> = FormatRefWithRule< 'a, ast::Arguments, crate::other::arguments::FormatArguments, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::other::arguments::FormatArguments::default()) } } impl<'ast> IntoFormat> for ast::Arguments { type Format = FormatOwnedWithRule< ast::Arguments, crate::other::arguments::FormatArguments, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::other::arguments::FormatArguments::default()) } } impl FormatRule> for crate::other::arg::FormatArg { #[inline] fn fmt(&self, node: &ast::Arg, f: &mut Formatter>) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::Arg { type Format<'a> = FormatRefWithRule<'a, ast::Arg, crate::other::arg::FormatArg, PyFormatContext<'ast>>; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::other::arg::FormatArg::default()) } } impl<'ast> IntoFormat> for ast::Arg { type Format = FormatOwnedWithRule>; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::other::arg::FormatArg::default()) } } impl FormatRule> for crate::other::arg_with_default::FormatArgWithDefault { #[inline] fn fmt( &self, node: &ast::ArgWithDefault, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::ArgWithDefault { type Format<'a> = FormatRefWithRule< 'a, ast::ArgWithDefault, crate::other::arg_with_default::FormatArgWithDefault, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, crate::other::arg_with_default::FormatArgWithDefault::default(), ) } } impl<'ast> IntoFormat> for ast::ArgWithDefault { type Format = FormatOwnedWithRule< ast::ArgWithDefault, crate::other::arg_with_default::FormatArgWithDefault, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, crate::other::arg_with_default::FormatArgWithDefault::default(), ) } } impl FormatRule> for crate::other::keyword::FormatKeyword { #[inline] fn fmt(&self, node: &ast::Keyword, f: &mut Formatter>) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::Keyword { type Format<'a> = FormatRefWithRule< 'a, ast::Keyword, crate::other::keyword::FormatKeyword, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::other::keyword::FormatKeyword::default()) } } impl<'ast> IntoFormat> for ast::Keyword { type Format = FormatOwnedWithRule< ast::Keyword, crate::other::keyword::FormatKeyword, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::other::keyword::FormatKeyword::default()) } } impl FormatRule> for crate::other::alias::FormatAlias { #[inline] fn fmt(&self, node: &ast::Alias, f: &mut Formatter>) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::Alias { type Format<'a> = FormatRefWithRule<'a, ast::Alias, crate::other::alias::FormatAlias, PyFormatContext<'ast>>; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::other::alias::FormatAlias::default()) } } impl<'ast> IntoFormat> for ast::Alias { type Format = FormatOwnedWithRule>; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::other::alias::FormatAlias::default()) } } impl FormatRule> for crate::other::with_item::FormatWithItem { #[inline] fn fmt( &self, node: &ast::WithItem, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::WithItem { type Format<'a> = FormatRefWithRule< 'a, ast::WithItem, crate::other::with_item::FormatWithItem, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::other::with_item::FormatWithItem::default()) } } impl<'ast> IntoFormat> for ast::WithItem { type Format = FormatOwnedWithRule< ast::WithItem, crate::other::with_item::FormatWithItem, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::other::with_item::FormatWithItem::default()) } } impl FormatRule> for crate::other::match_case::FormatMatchCase { #[inline] fn fmt( &self, node: &ast::MatchCase, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::MatchCase { type Format<'a> = FormatRefWithRule< 'a, ast::MatchCase, crate::other::match_case::FormatMatchCase, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::other::match_case::FormatMatchCase::default()) } } impl<'ast> IntoFormat> for ast::MatchCase { type Format = FormatOwnedWithRule< ast::MatchCase, crate::other::match_case::FormatMatchCase, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::other::match_case::FormatMatchCase::default()) } } impl FormatRule> for crate::other::decorator::FormatDecorator { #[inline] fn fmt( &self, node: &ast::Decorator, f: &mut Formatter>, ) -> FormatResult<()> { FormatNodeRule::::fmt(self, node, f) } } impl<'ast> AsFormat> for ast::Decorator { type Format<'a> = FormatRefWithRule< 'a, ast::Decorator, crate::other::decorator::FormatDecorator, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new(self, crate::other::decorator::FormatDecorator::default()) } } impl<'ast> IntoFormat> for ast::Decorator { type Format = FormatOwnedWithRule< ast::Decorator, crate::other::decorator::FormatDecorator, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new(self, crate::other::decorator::FormatDecorator::default()) } }