Struct mit_commit_message_lints::lints::Lints[][src]

pub struct Lints { /* fields omitted */ }

Implementations

impl Lints[src]

#[must_use]
pub fn new(lints: BTreeSet<Lint>) -> Lints
[src]

#[must_use]
pub fn available() -> &'static Lints
[src]

#[must_use]
pub fn names(self) -> Vec<&'static str>
[src]

#[must_use]
pub fn config_keys(self) -> Vec<String>
[src]

pub fn get_from_toml_or_else_vcs(
    config: &str,
    vcs: &mut dyn Vcs
) -> Result<Lints, Error>
[src]

Errors

If we fail to parse the toml

Panics

Will panic if the lint prefix isn’t delimited by dots. This should never happen as it’s a constant

pub fn try_from_vcs(config: &mut dyn Vcs) -> Result<Lints, Error>[src]

Create lints from the VCS configuration

Errors

If reading from the VCS fails

#[must_use]
pub fn merge(&self, other: &Lints) -> Lints
[src]

#[must_use]
pub fn subtract(&self, other: &Lints) -> Lints
[src]

Trait Implementations

impl Clone for Lints[src]

fn clone(&self) -> Lints[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Lints[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl From<Vec<Lint, Global>> for Lints[src]

fn from(lints: Vec<Lint>) -> Self[src]

Performs the conversion.

impl IntoIterator for Lints[src]

type Item = Lint

The type of the elements being iterated over.

type IntoIter = IntoIter<Lint>

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter[src]

Creates an iterator from a value. Read more

impl PartialEq<Lints> for Lints[src]

fn eq(&self, other: &Lints) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Lints) -> bool[src]

This method tests for !=.

impl TryFrom<Vec<&'_ str, Global>> for Lints[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(value: Vec<&str>) -> Result<Self, Self::Error>[src]

Performs the conversion.

impl Eq for Lints[src]

impl StructuralEq for Lints[src]

impl StructuralPartialEq for Lints[src]

Auto Trait Implementations

impl RefUnwindSafe for Lints

impl Send for Lints

impl Sync for Lints

impl Unpin for Lints

impl UnwindSafe for Lints

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> ToCells for T where
    T: IntoIterator,
    <T as IntoIterator>::Item: ToCell
[src]

pub fn to_cells(self) -> Vec<Cell, Global>[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToRow for T where
    T: ToCells
[src]

pub fn to_row(self) -> Row[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.