[−][src]Struct mit_commit::Bodies
A collection of user input CommitMessage
text
Implementations
impl Bodies
[src]
#[must_use]pub fn first(&self) -> Option<Body>
[src]
Get the first Body
in this list of Bodies
Examples
use mit_commit::{Bodies, Body, Subject}; let bodies: Vec<Body> = Vec::default(); assert_eq!(None, Bodies::from(bodies).first()); let bodies: Vec<Body> = vec![ Body::from("First"), Body::from("Second"), Body::from("Third"), ]; assert_eq!(Some(Body::from("First")), Bodies::from(bodies).first());
#[must_use]pub fn iter(&self) -> Iter<Body>
[src]
Iterate over the Body
in the Bodies
Examples
use mit_commit::Bodies; use mit_commit::Body; let trailers = Bodies::from(vec![ Body::from("Body 1"), Body::from("Body 2"), Body::from("Body 3"), ]); let mut iterator = trailers.iter(); assert_eq!(iterator.next(), Some(&Body::from("Body 1"))); assert_eq!(iterator.next(), Some(&Body::from("Body 2"))); assert_eq!(iterator.next(), Some(&Body::from("Body 3"))); assert_eq!(iterator.next(), None);
Trait Implementations
impl Clone for Bodies
[src]
impl Debug for Bodies
[src]
impl Display for Bodies
[src]
impl From<Bodies> for String
[src]
impl From<Vec<Body>> for Bodies
[src]
impl From<Vec<Fragment>> for Bodies
[src]
impl PartialEq<Bodies> for Bodies
[src]
impl StructuralPartialEq for Bodies
[src]
Auto Trait Implementations
impl RefUnwindSafe for Bodies
impl Send for Bodies
impl Sync for Bodies
impl Unpin for Bodies
impl UnwindSafe for Bodies
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>,