[−][src]Struct mit_commit::Body
A single contiguous block of CommitMessage
text
Implementations
impl Body
[src]
#[must_use]pub fn append(&self, additional: &Body) -> Body
[src]
Append one body onto another
This is for concatenating multiple bodies together
Example
use indoc::indoc; use mit_commit::Body; assert_eq!( Body::from(indoc!( " Example 1 Example 2" )), Body::from("Example 1").append(&Body::from("Example 2")) )
#[must_use]pub fn is_empty(&self) -> bool
[src]
Is this body empty
Empty bodies usually indicate a paragraph break in commit messages so it's handy to be able to see them.
Example
use indoc::indoc; use mit_commit::Body; assert_eq!(Body::from("").is_empty(), true)
Trait Implementations
impl Clone for Body
[src]
impl Debug for Body
[src]
impl Default for Body
[src]
impl Display for Body
[src]
impl<'_> From<&'_ str> for Body
[src]
impl From<Body> for String
[src]
impl From<Body> for Subject
[src]
impl From<String> for Body
[src]
impl PartialEq<Body> for Body
[src]
impl StructuralPartialEq for Body
[src]
impl TryFrom<Body> for Trailer
[src]
Auto Trait Implementations
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnwindSafe for Body
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,