pub struct CommandText<T: TreeToken = SyntaxToken>(/* private fields */);Expand description
Represents a textual part of a command.
Implementations§
Source§impl<T: TreeToken> CommandText<T>
impl<T: TreeToken> CommandText<T>
Sourcepub fn unescape_to(&self, heredoc: bool, buffer: &mut String)
pub fn unescape_to(&self, heredoc: bool, buffer: &mut String)
Unescapes the command text to the given buffer.
When heredoc is true, only heredoc escape sequences are allowed.
Otherwise, brace command sequences are accepted.
Trait Implementations§
Source§impl<T: TreeToken> AstToken<T> for CommandText<T>
impl<T: TreeToken> AstToken<T> for CommandText<T>
Source§fn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
Determines if the kind can be cast to this representation.
Source§fn kind(&self) -> SyntaxKind
fn kind(&self) -> SyntaxKind
Gets the syntax kind of the token.
Source§impl<T: Clone + TreeToken> Clone for CommandText<T>
impl<T: Clone + TreeToken> Clone for CommandText<T>
Source§fn clone(&self) -> CommandText<T>
fn clone(&self) -> CommandText<T>
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<T: Eq + TreeToken> Eq for CommandText<T>
impl<T: TreeToken> StructuralPartialEq for CommandText<T>
Auto Trait Implementations§
impl<T> Freeze for CommandText<T>where
T: Freeze,
impl<T> RefUnwindSafe for CommandText<T>where
T: RefUnwindSafe,
impl<T> Send for CommandText<T>where
T: Send,
impl<T> Sync for CommandText<T>where
T: Sync,
impl<T> Unpin for CommandText<T>where
T: Unpin,
impl<T> UnwindSafe for CommandText<T>where
T: UnwindSafe,
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