pub enum InterpolatedStringElement {
Interpolation(InterpolatedElement),
Literal(InterpolatedStringLiteralElement),
}Variants§
Interpolation(InterpolatedElement)
Literal(InterpolatedStringLiteralElement)
Implementations§
Source§impl InterpolatedStringElement
impl InterpolatedStringElement
pub const fn is_interpolation(&self) -> bool
pub fn interpolation(self) -> Option<InterpolatedElement>
pub fn expect_interpolation(self) -> InterpolatedElement
pub fn as_interpolation_mut(&mut self) -> Option<&mut InterpolatedElement>
pub fn as_interpolation(&self) -> Option<&InterpolatedElement>
pub const fn is_literal(&self) -> bool
pub fn literal(self) -> Option<InterpolatedStringLiteralElement>
pub fn expect_literal(self) -> InterpolatedStringLiteralElement
pub fn as_literal_mut( &mut self, ) -> Option<&mut InterpolatedStringLiteralElement>
pub fn as_literal(&self) -> Option<&InterpolatedStringLiteralElement>
Trait Implementations§
Source§impl Clone for InterpolatedStringElement
impl Clone for InterpolatedStringElement
Source§fn clone(&self) -> InterpolatedStringElement
fn clone(&self) -> InterpolatedStringElement
Returns a duplicate 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 InterpolatedStringElement
impl Debug for InterpolatedStringElement
Source§impl<'a> From<&'a InterpolatedStringElement> for AnyNodeRef<'a>
impl<'a> From<&'a InterpolatedStringElement> for AnyNodeRef<'a>
Source§fn from(node: &'a InterpolatedStringElement) -> AnyNodeRef<'a>
fn from(node: &'a InterpolatedStringElement) -> AnyNodeRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a InterpolatedStringElement> for AnyRootNodeRef<'a>
impl<'a> From<&'a InterpolatedStringElement> for AnyRootNodeRef<'a>
Source§fn from(node: &'a InterpolatedStringElement) -> AnyRootNodeRef<'a>
fn from(node: &'a InterpolatedStringElement) -> AnyRootNodeRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a InterpolatedStringElement> for ComparableInterpolatedStringElement<'a>
impl<'a> From<&'a InterpolatedStringElement> for ComparableInterpolatedStringElement<'a>
Source§fn from(interpolated_string_element: &'a InterpolatedStringElement) -> Self
fn from(interpolated_string_element: &'a InterpolatedStringElement) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a InterpolatedStringElement> for InterpolatedStringElementRef<'a>
impl<'a> From<&'a InterpolatedStringElement> for InterpolatedStringElementRef<'a>
Source§fn from(node: &'a InterpolatedStringElement) -> Self
fn from(node: &'a InterpolatedStringElement) -> Self
Converts to this type from the input type.
Source§impl From<InterpolatedElement> for InterpolatedStringElement
impl From<InterpolatedElement> for InterpolatedStringElement
Source§fn from(node: InterpolatedElement) -> Self
fn from(node: InterpolatedElement) -> Self
Converts to this type from the input type.
Source§impl From<InterpolatedStringLiteralElement> for InterpolatedStringElement
impl From<InterpolatedStringLiteralElement> for InterpolatedStringElement
Source§fn from(node: InterpolatedStringLiteralElement) -> Self
fn from(node: InterpolatedStringLiteralElement) -> Self
Converts to this type from the input type.
Source§impl HasNodeIndex for InterpolatedStringElement
impl HasNodeIndex for InterpolatedStringElement
Source§fn node_index(&self) -> &AtomicNodeIndex
fn node_index(&self) -> &AtomicNodeIndex
Returns the
AtomicNodeIndex for this node.Source§impl Ranged for InterpolatedStringElement
impl Ranged for InterpolatedStringElement
Source§impl<'a> TryFrom<AnyRootNodeRef<'a>> for &'a InterpolatedStringElement
impl<'a> TryFrom<AnyRootNodeRef<'a>> for &'a InterpolatedStringElement
impl StructuralPartialEq for InterpolatedStringElement
Auto Trait Implementations§
impl !Freeze for InterpolatedStringElement
impl RefUnwindSafe for InterpolatedStringElement
impl Send for InterpolatedStringElement
impl Sync for InterpolatedStringElement
impl Unpin for InterpolatedStringElement
impl UnsafeUnpin for InterpolatedStringElement
impl UnwindSafe for InterpolatedStringElement
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§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