Skip to main content

CommentCallback

Trait CommentCallback 

Source
pub trait CommentCallback {
    // Required methods
    fn on_comment(
        &mut self,
        comment: &Comment,
        file_id: FileId,
        is_target: bool,
    );
    fn into_any(self: Box<Self>) -> Box<dyn Any>;
}
Expand description

コメント読み込み時のコールバックトレイト

Preprocessor がコメントを読み込んだときに呼び出される。 apidoc の収集など、コメント内容に基づく処理に使用する。

Required Methods§

Source

fn on_comment(&mut self, comment: &Comment, file_id: FileId, is_target: bool)

コメントが読み込まれたときに呼ばれる

  • comment: コメント内容
  • file_id: ファイルID
  • is_target: このファイルが解析対象(samples/wrapper.h からの include)かどうか
Source

fn into_any(self: Box<Self>) -> Box<dyn Any>

ダウンキャスト用に Any に変換

Implementors§