pub struct ClassContext {
pub code_context: String,
pub file_type: String,
pub in_string: bool,
pub in_comment: bool,
pub metadata: HashMap<String, String>,
}Expand description
Class context information
Fields§
§code_context: StringSurrounding code context
file_type: StringFile type
in_string: boolWhether class is in a string literal
in_comment: boolWhether class is in a comment
metadata: HashMap<String, String>Additional metadata
Implementations§
Source§impl ClassContext
impl ClassContext
Sourcepub fn with_file_type(file_type: &str) -> Self
pub fn with_file_type(file_type: &str) -> Self
Create with file type
Trait Implementations§
Source§impl Clone for ClassContext
impl Clone for ClassContext
Source§fn clone(&self) -> ClassContext
fn clone(&self) -> ClassContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ClassContext
impl Debug for ClassContext
Source§impl Default for ClassContext
impl Default for ClassContext
Source§impl<'de> Deserialize<'de> for ClassContext
impl<'de> Deserialize<'de> for ClassContext
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
Source§impl PartialEq for ClassContext
impl PartialEq for ClassContext
Source§impl Serialize for ClassContext
impl Serialize for ClassContext
impl StructuralPartialEq for ClassContext
Auto Trait Implementations§
impl Freeze for ClassContext
impl RefUnwindSafe for ClassContext
impl Send for ClassContext
impl Sync for ClassContext
impl Unpin for ClassContext
impl UnsafeUnpin for ClassContext
impl UnwindSafe for ClassContext
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