Struct source_span::DefaultMetrics [−][src]
pub struct DefaultMetrics { /* fields omitted */ }Expand description
Default metrics infos.
By default, tab stop length is 8, but it can be set using DefaultMetrics::with_tab_stop.
Implementations
impl DefaultMetrics[src]
impl DefaultMetrics[src]#[must_use]pub const fn new() -> DefaultMetrics[src]
#[must_use]pub const fn new() -> DefaultMetrics[src]Create a new default metrics instance.
Tab stop length will be 8.
#[must_use]pub const fn with_tab_stop(tab_stop: usize) -> DefaultMetrics[src]
#[must_use]pub const fn with_tab_stop(tab_stop: usize) -> DefaultMetrics[src]Create a new default metrics with a custom tab stop length.
Trait Implementations
impl Clone for DefaultMetrics[src]
impl Clone for DefaultMetrics[src]fn clone(&self) -> DefaultMetrics[src]
fn clone(&self) -> DefaultMetrics[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for DefaultMetrics[src]
impl Debug for DefaultMetrics[src]impl Hash for DefaultMetrics[src]
impl Hash for DefaultMetrics[src]impl Metrics for DefaultMetrics[src]
impl Metrics for DefaultMetrics[src]impl PartialEq<DefaultMetrics> for DefaultMetrics[src]
impl PartialEq<DefaultMetrics> for DefaultMetrics[src]fn eq(&self, other: &DefaultMetrics) -> bool[src]
fn eq(&self, other: &DefaultMetrics) -> bool[src]This method tests for self and other values to be equal, and is used
by ==. Read more
fn ne(&self, other: &DefaultMetrics) -> bool[src]
fn ne(&self, other: &DefaultMetrics) -> bool[src]This method tests for !=.
impl Copy for DefaultMetrics[src]
impl Eq for DefaultMetrics[src]
impl StructuralEq for DefaultMetrics[src]
impl StructuralPartialEq for DefaultMetrics[src]
Auto Trait Implementations
impl RefUnwindSafe for DefaultMetrics
impl Send for DefaultMetrics
impl Sync for DefaultMetrics
impl Unpin for DefaultMetrics
impl UnwindSafe for DefaultMetrics
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
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]
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