Trait cargo_gazelle::ToBazelDefinition

source ·
pub trait ToBazelDefinition: Debug {
    // Required method
    fn format(&self, writer: &mut dyn Write) -> Result<(), Error>;

    // Provided method
    fn to_bazel_definition(&self) -> String { ... }
}
Expand description

Formatting trait for converting a type to its BUILD.bazel representation.

Required Methods§

source

fn format(&self, writer: &mut dyn Write) -> Result<(), Error>

Provided Methods§

Implementations on Foreign Types§

source§

impl ToBazelDefinition for bool

source§

fn format(&self, writer: &mut dyn Write) -> Result<(), Error>

source§

impl<T: ToBazelDefinition> ToBazelDefinition for Option<T>

source§

fn format(&self, writer: &mut dyn Write) -> Result<(), Error>

Implementors§