genco::lang::csharp

Function comment

Source
pub fn comment<T>(comment: T) -> Comment<T>
where T: IntoIterator, T::Item: Into<ItemStr>,
Expand description

Format a doc comment where each line is preceeded by //.

ยงExamples

use genco::prelude::*;

let toks = quote! {
    $(csharp::comment(&["Foo"]))
    $(csharp::comment(&["Bar"]))
};

assert_eq!(
    vec![
        "// Foo",
        "// Bar",
    ],
    toks.to_file_vec()?
);