pub struct CodeComment {
pub path: String,
pub line: usize,
pub quote: String,
pub text: String,
}Expand description
One line comment of the Code view.
Fields§
§path: StringProject-relative path.
line: usizeThe line (1-based).
quote: StringThe code on that line.
text: StringThe person’s words.
Implementations§
Source§impl CodeComment
impl CodeComment
Sourcepub fn nudge_line(&self) -> String
pub fn nudge_line(&self) -> String
The nudge line: src/a.rs:12 "let x = …" — text.
Trait Implementations§
Source§impl Clone for CodeComment
impl Clone for CodeComment
Source§impl Debug for CodeComment
impl Debug for CodeComment
Source§impl<'de> Deserialize<'de> for CodeComment
impl<'de> Deserialize<'de> for CodeComment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CodeComment
Source§impl JsonSchema for CodeComment
impl JsonSchema for CodeComment
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for CodeComment
impl PartialEq for CodeComment
Source§impl Serialize for CodeComment
impl Serialize for CodeComment
impl StructuralPartialEq for CodeComment
Auto Trait Implementations§
impl Freeze for CodeComment
impl RefUnwindSafe for CodeComment
impl Send for CodeComment
impl Sync for CodeComment
impl Unpin for CodeComment
impl UnsafeUnpin for CodeComment
impl UnwindSafe for CodeComment
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