pub enum CommentStyle {
JsDoc,
PyDocstring,
RustDoc,
RustModuleDoc,
GoDoc,
Javadoc,
}Expand description
@acp:summary “Comment style for different languages”
Variants§
JsDoc
JSDoc: /** … */
PyDocstring
Python docstring: “”“…”“”
RustDoc
Rust doc: ///
RustModuleDoc
Rust module doc: //!
GoDoc
Go: //
Javadoc
Javadoc: /** … */
Implementations§
Source§impl CommentStyle
impl CommentStyle
Sourcepub fn from_language(language: &str, is_module_level: bool) -> Self
pub fn from_language(language: &str, is_module_level: bool) -> Self
@acp:summary “Determines comment style from language and context”
Sourcepub fn format_annotations(
&self,
annotations: &[Suggestion],
indent: &str,
) -> String
pub fn format_annotations( &self, annotations: &[Suggestion], indent: &str, ) -> String
@acp:summary “Formats annotations into a comment block”
Sourcepub fn format_for_insertion(
&self,
annotations: &[Suggestion],
indent: &str,
) -> Vec<String>
pub fn format_for_insertion( &self, annotations: &[Suggestion], indent: &str, ) -> Vec<String>
@acp:summary “Formats annotations for insertion into existing doc comment” Places ACP annotations at the beginning of the comment.
Sourcepub fn format_annotations_with_provenance(
&self,
annotations: &[Suggestion],
indent: &str,
config: &ProvenanceConfig,
) -> String
pub fn format_annotations_with_provenance( &self, annotations: &[Suggestion], indent: &str, config: &ProvenanceConfig, ) -> String
@acp:summary “Formats annotations with RFC-0003 provenance markers”
Sourcepub fn format_for_insertion_with_provenance(
&self,
annotations: &[Suggestion],
indent: &str,
config: &ProvenanceConfig,
) -> Vec<String>
pub fn format_for_insertion_with_provenance( &self, annotations: &[Suggestion], indent: &str, config: &ProvenanceConfig, ) -> Vec<String>
@acp:summary “Formats annotations for insertion with RFC-0003 provenance markers”
Trait Implementations§
Source§impl Clone for CommentStyle
impl Clone for CommentStyle
Source§fn clone(&self) -> CommentStyle
fn clone(&self) -> CommentStyle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommentStyle
impl Debug for CommentStyle
Source§impl PartialEq for CommentStyle
impl PartialEq for CommentStyle
impl Copy for CommentStyle
impl Eq for CommentStyle
impl StructuralPartialEq for CommentStyle
Auto Trait Implementations§
impl Freeze for CommentStyle
impl RefUnwindSafe for CommentStyle
impl Send for CommentStyle
impl Sync for CommentStyle
impl Unpin for CommentStyle
impl UnwindSafe for CommentStyle
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 more