pub enum StringPart<N: TreeNode = SyntaxNode> {
Text(StringText<N::Token>),
Placeholder(Placeholder<N>),
}Expand description
Represents a part of a string.
Variants§
Text(StringText<N::Token>)
A textual part of the string.
Placeholder(Placeholder<N>)
A placeholder encountered in the string.
Implementations§
Source§impl<N: TreeNode> StringPart<N>
impl<N: TreeNode> StringPart<N>
Sourcepub fn unwrap_text(self) -> StringText<N::Token>
pub fn unwrap_text(self) -> StringText<N::Token>
Sourcepub fn unwrap_placeholder(self) -> Placeholder<N>
pub fn unwrap_placeholder(self) -> Placeholder<N>
Trait Implementations§
Source§impl<N: Clone + TreeNode> Clone for StringPart<N>
impl<N: Clone + TreeNode> Clone for StringPart<N>
Source§fn clone(&self) -> StringPart<N>
fn clone(&self) -> StringPart<N>
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 moreimpl<N: Eq + TreeNode> Eq for StringPart<N>
impl<N: TreeNode> StructuralPartialEq for StringPart<N>
Auto Trait Implementations§
impl<N> Freeze for StringPart<N>
impl<N> RefUnwindSafe for StringPart<N>
impl<N> Send for StringPart<N>
impl<N> Sync for StringPart<N>
impl<N> Unpin for StringPart<N>
impl<N> UnwindSafe for StringPart<N>
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