pub struct CodeContext {
pub before: Vec<String>,
pub after: Vec<String>,
pub imports: Vec<String>,
pub parent: Option<String>,
}Expand description
Surrounding context for a code chunk
Fields§
§before: Vec<String>Lines before the match
after: Vec<String>Lines after the match
imports: Vec<String>Import statements in the file
parent: Option<String>Parent element (class name, module, etc.)
Trait Implementations§
Source§impl Clone for CodeContext
impl Clone for CodeContext
Source§fn clone(&self) -> CodeContext
fn clone(&self) -> CodeContext
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 CodeContext
impl Debug for CodeContext
Source§impl<'de> Deserialize<'de> for CodeContext
impl<'de> Deserialize<'de> for CodeContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CodeContext
impl RefUnwindSafe for CodeContext
impl Send for CodeContext
impl Sync for CodeContext
impl Unpin for CodeContext
impl UnwindSafe for CodeContext
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