[−][src]Struct tweep::FullContext
A context that represents a span of twee code with a beginning, end, and contents, along with a file name and some helper functions
Implementations
impl FullContext
[src]
pub fn from(file_name: Option<String>, contents: String) -> Self
[src]
Creates a new context from the given file name and string
pub fn get_file_name(&self) -> &Option<String>
[src]
Gets a reference to the optional file name
pub fn get_start_position(&self) -> &Position
[src]
Gets a reference to the 1-indexed start position of this context
pub fn get_end_position(&self) -> &Position
[src]
Gets a reference to the inclusive 1-indexed end position of this context
pub fn get_byte_range(&self) -> Range<usize>
[src]
Gets the span of this context as line bytes within the contents
pub fn get_contents(&self) -> &str
[src]
Gets a reference to the contents of this context
pub fn subcontext<T>(&self, range: T) -> Self where
T: SubContextRange,
[src]
T: SubContextRange,
Creates a subcontext out of the current context from the inclusive, 1-indexed start and end positions
Trait Implementations
impl Clone for FullContext
[src]
fn clone(&self) -> FullContext
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for FullContext
[src]
impl Eq for FullContext
[src]
impl From<FullContext> for PartialContext
[src]
fn from(full: FullContext) -> PartialContext
[src]
impl PartialEq<FullContext> for FullContext
[src]
fn eq(&self, other: &FullContext) -> bool
[src]
fn ne(&self, other: &FullContext) -> bool
[src]
impl StructuralEq for FullContext
[src]
impl StructuralPartialEq for FullContext
[src]
Auto Trait Implementations
impl !RefUnwindSafe for FullContext
impl !Send for FullContext
impl !Sync for FullContext
impl Unpin for FullContext
impl UnwindSafe for FullContext
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,