pub struct ScriptLine {
pub location: ScriptLocation,
/* private fields */
}Fields§
§location: ScriptLocationImplementations§
Source§impl ScriptLine
impl ScriptLine
pub fn new(file: ScriptFile, line: usize, text: impl AsRef<str>) -> Self
pub fn parse(file: ScriptFile, text: impl AsRef<str>) -> Vec<Self>
pub fn starts_with(&self, text: &str) -> bool
pub fn first_char(&self) -> Option<char>
pub fn text(&self) -> &str
pub fn text_untrimmed(&self) -> &str
pub fn is_empty(&self) -> bool
pub fn strip_prefix(&self, prefix: &str) -> Option<&str>
Trait Implementations§
Source§impl Clone for ScriptLine
impl Clone for ScriptLine
Source§fn clone(&self) -> ScriptLine
fn clone(&self) -> ScriptLine
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 ScriptLine
impl Debug for ScriptLine
Source§impl PartialEq for ScriptLine
impl PartialEq for ScriptLine
impl Eq for ScriptLine
impl StructuralPartialEq for ScriptLine
Auto Trait Implementations§
impl Freeze for ScriptLine
impl RefUnwindSafe for ScriptLine
impl Send for ScriptLine
impl Sync for ScriptLine
impl Unpin for ScriptLine
impl UnwindSafe for ScriptLine
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