pub struct Java { /* private fields */ }Trait Implementations§
Source§impl Language<'_> for Java
impl Language<'_> for Java
Source§const NAME: &'static str = "java"
const NAME: &'static str = "java"
Source§type Config = JavaConfig
type Config = JavaConfig
serde. Read moreSource§fn new_from_config(config: Self::Config) -> Result<Self>
fn new_from_config(config: Self::Config) -> Result<Self>
Source§fn output_filename_for_crate(&self, crate_name: &CrateName) -> String
fn output_filename_for_crate(&self, crate_name: &CrateName) -> String
Source§fn format_special_type(
&self,
special_ty: &SpecialRustType,
generic_context: &[TypeName],
) -> Result<String>
fn format_special_type( &self, special_ty: &SpecialRustType, generic_context: &[TypeName], ) -> Result<String>
Source§fn begin_file(
&self,
w: &mut impl Write,
mode: FilesMode<&CrateName>,
) -> Result<()>
fn begin_file( &self, w: &mut impl Write, mode: FilesMode<&CrateName>, ) -> Result<()>
Source§fn write_imports<'a, Crates, Types>(
&self,
writer: &mut impl Write,
_crate_name: &CrateName,
imports: Crates,
) -> Result<()>where
Crates: IntoIterator<Item = (&'a CrateName, Types)>,
Types: IntoIterator<Item = &'a TypeName>,
fn write_imports<'a, Crates, Types>(
&self,
writer: &mut impl Write,
_crate_name: &CrateName,
imports: Crates,
) -> Result<()>where
Crates: IntoIterator<Item = (&'a CrateName, Types)>,
Types: IntoIterator<Item = &'a TypeName>,
begin_file and before any other writes. Read moreSource§fn end_file(
&self,
w: &mut impl Write,
_mode: FilesMode<&CrateName>,
) -> Result<()>
fn end_file( &self, w: &mut impl Write, _mode: FilesMode<&CrateName>, ) -> Result<()>
Source§fn write_type_alias(
&self,
_w: &mut impl Write,
_t: &RustTypeAlias,
) -> Result<()>
fn write_type_alias( &self, _w: &mut impl Write, _t: &RustTypeAlias, ) -> Result<()>
Source§fn write_struct(&self, w: &mut impl Write, rs: &RustStruct) -> Result<()>
fn write_struct(&self, w: &mut impl Write, rs: &RustStruct) -> Result<()>
Source§fn write_enum(&self, w: &mut impl Write, e: &RustEnum) -> Result<()>
fn write_enum(&self, w: &mut impl Write, e: &RustEnum) -> Result<()>
Source§fn write_const(&self, _w: &mut impl Write, _c: &RustConst) -> Result<()>
fn write_const(&self, _w: &mut impl Write, _c: &RustConst) -> Result<()>
Source§fn mapped_type(&self, type_name: &TypeName) -> Option<Cow<'_, str>>
fn mapped_type(&self, type_name: &TypeName) -> Option<Cow<'_, str>>
Source§fn format_type(
&self,
ty: &RustType,
generic_context: &[TypeName],
) -> Result<String, Error>
fn format_type( &self, ty: &RustType, generic_context: &[TypeName], ) -> Result<String, Error>
format_simple_type, format_generic_type, or
format_special_type, depending on the type. There should only rarely
be a need to specialize this. Read moreSource§fn format_simple_type(
&self,
base: &TypeName,
generic_context: &[TypeName],
) -> Result<String, Error>
fn format_simple_type( &self, base: &TypeName, generic_context: &[TypeName], ) -> Result<String, Error>
Source§fn format_generic_type(
&self,
base: &TypeName,
parameters: &[RustType],
generic_context: &[TypeName],
) -> Result<String, Error>
fn format_generic_type( &self, base: &TypeName, parameters: &[RustType], generic_context: &[TypeName], ) -> Result<String, Error>
Source§fn format_generic_parameters(
&self,
parameters: &[RustType],
generic_context: &[TypeName],
) -> Result<String, Error>
fn format_generic_parameters( &self, parameters: &[RustType], generic_context: &[TypeName], ) -> Result<String, Error>
<A, B, C, ...>, since that’s a common syntax
used by most languages. Read moreSource§fn write_struct_types_for_enum_variants(
&self,
w: &mut impl Write,
e: &RustEnum,
make_struct_name: &impl Fn(&TypeName) -> String,
) -> Result<(), Error>
fn write_struct_types_for_enum_variants( &self, w: &mut impl Write, e: &RustEnum, make_struct_name: &impl Fn(&TypeName) -> String, ) -> Result<(), Error>
Source§fn exclude_from_import_analysis(&self, name: &TypeName) -> bool
fn exclude_from_import_analysis(&self, name: &TypeName) -> bool
mapped_types, since those are types with special behavior
(for instance, a datetime date provided as a standard type by your
langauge). Read moreSource§fn write_additional_files<'a>(
&self,
output_folder: &Path,
output_files: impl IntoIterator<Item = (&'a CrateName, &'a Path)>,
) -> Result<(), Error>
fn write_additional_files<'a>( &self, output_folder: &Path, output_files: impl IntoIterator<Item = (&'a CrateName, &'a Path)>, ) -> Result<(), Error>
mod.rs, __init__.py, index.js, or
anything else like that. Read moreAuto Trait Implementations§
impl Freeze for Java
impl RefUnwindSafe for Java
impl Send for Java
impl Sync for Java
impl Unpin for Java
impl UnwindSafe for Java
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
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>
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>
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);