pub struct IndentLevel(pub u8);
Tuple Fields§
§0: u8
Implementations§
source§impl IndentLevel
impl IndentLevel
pub fn single() -> IndentLevel
pub fn is_zero(&self) -> bool
pub fn from_element(element: &SyntaxElement) -> IndentLevel
pub fn from_node(node: &SyntaxNode) -> IndentLevel
pub fn from_token(token: &SyntaxToken) -> IndentLevel
Trait Implementations§
source§impl Add<u8> for IndentLevel
impl Add<u8> for IndentLevel
source§type Output = IndentLevel
type Output = IndentLevel
The resulting type after applying the
+
operator.source§impl Clone for IndentLevel
impl Clone for IndentLevel
source§fn clone(&self) -> IndentLevel
fn clone(&self) -> IndentLevel
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for IndentLevel
impl Debug for IndentLevel
source§impl Display for IndentLevel
impl Display for IndentLevel
source§impl From<u8> for IndentLevel
impl From<u8> for IndentLevel
source§fn from(level: u8) -> IndentLevel
fn from(level: u8) -> IndentLevel
Converts to this type from the input type.
source§impl PartialEq for IndentLevel
impl PartialEq for IndentLevel
impl Copy for IndentLevel
impl Eq for IndentLevel
impl StructuralPartialEq for IndentLevel
Auto Trait Implementations§
impl Freeze for IndentLevel
impl RefUnwindSafe for IndentLevel
impl Send for IndentLevel
impl Sync for IndentLevel
impl Unpin for IndentLevel
impl UnwindSafe for IndentLevel
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more