pub struct CommentBody(/* private fields */);Expand description
What a comment says: anything at all, except nothing.
A newtype rather than a String checked by whoever happens to read it, because an empty
comment is refused by every source this product drives and by the command line before
any of them: a value of this type is one a source can be handed without asking again.
Everything else about the text is kept exactly — no trimming, no newline normalisation —
because a body quoting a command or a stack trace is only useful byte for byte.
Implementations§
Source§impl CommentBody
impl CommentBody
Trait Implementations§
Source§impl Clone for CommentBody
impl Clone for CommentBody
Source§fn clone(&self) -> CommentBody
fn clone(&self) -> CommentBody
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommentBody
impl Debug for CommentBody
Source§impl<'de> Deserialize<'de> for CommentBody
impl<'de> Deserialize<'de> for CommentBody
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 CommentBody
Source§impl From<CommentBody> for String
impl From<CommentBody> for String
Source§fn from(body: CommentBody) -> Self
fn from(body: CommentBody) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for CommentBody
impl JsonSchema for CommentBody
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 CommentBody
impl PartialEq for CommentBody
Source§impl Serialize for CommentBody
impl Serialize for CommentBody
impl StructuralPartialEq for CommentBody
Auto Trait Implementations§
impl Freeze for CommentBody
impl RefUnwindSafe for CommentBody
impl Send for CommentBody
impl Sync for CommentBody
impl Unpin for CommentBody
impl UnsafeUnpin for CommentBody
impl UnwindSafe for CommentBody
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