pub struct Stripped { /* private fields */ }Expand description
A statement with its comments, text literals and quoted identifiers blanked.
The text has exactly the same byte length as the input.
Implementations§
Source§impl Stripped
impl Stripped
Sourcepub const fn has_conditional_comment(&self) -> bool
pub const fn has_conditional_comment(&self) -> bool
Whether the input carried a conditional comment, whose body is code.
Sourcepub const fn unterminated(&self) -> Option<Unterminated>
pub const fn unterminated(&self) -> Option<Unterminated>
The region left open, when the input ended inside one.
Sourcepub fn refuse_if_unterminated(&self) -> Result<()>
pub fn refuse_if_unterminated(&self) -> Result<()>
Refuses a statement that ends inside a quote or a comment.
An open region means the rest of the text was read as data rather than as code, so no later decision about it can be trusted.
§Errors
Returns a validation failure when a region was left open.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stripped
impl RefUnwindSafe for Stripped
impl Send for Stripped
impl Sync for Stripped
impl Unpin for Stripped
impl UnsafeUnpin for Stripped
impl UnwindSafe for Stripped
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