[−][src]Enum genco::fmt::Indentation
Indentation configuration.
use genco::prelude::*; use genco::fmt; let tokens: rust::Tokens = quote! { fn foo() -> u32 { 42u32 } }; let mut w = fmt::VecWriter::new(); let fmt = fmt::Config::from_lang::<Rust>() .with_indentation(fmt::Indentation::Tab); let config = rust::Config::default(); tokens.format_file(&mut w.as_formatter(fmt), &config)?; assert_eq! { vec![ "fn foo() -> u32 {", "\t42u32", "}", ], w.into_vec(), };
Variants
Space(usize)
Each indentation is the given number of spaces.
Each indentation is a tab.
Trait Implementations
impl Clone for Indentation
[src]
fn clone(&self) -> Indentation
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Indentation
[src]
impl Debug for Indentation
[src]
Auto Trait Implementations
impl RefUnwindSafe for Indentation
impl Send for Indentation
impl Sync for Indentation
impl Unpin for Indentation
impl UnwindSafe for Indentation
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, 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>,