pub struct ComparisonOperatorSegment {
    pub raw: SmolStr,
    pub position_maker: PositionMarker,
    pub uuid: Uuid,
}

Fields§

§raw: SmolStr§position_maker: PositionMarker§uuid: Uuid

Implementations§

Trait Implementations§

source§

impl Clone for ComparisonOperatorSegment

source§

fn clone(&self) -> ComparisonOperatorSegment

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ComparisonOperatorSegment

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for ComparisonOperatorSegment

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for ComparisonOperatorSegment

source§

fn eq(&self, other: &ComparisonOperatorSegment) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Segment for ComparisonOperatorSegment

source§

fn new(&self, _segments: Vec<ErasedSegment>) -> ErasedSegment

source§

fn raw(&self) -> Cow<'_, str>

source§

fn get_type(&self) -> &'static str

source§

fn is_code(&self) -> bool

source§

fn is_comment(&self) -> bool

source§

fn is_whitespace(&self) -> bool

source§

fn get_position_marker(&self) -> Option<PositionMarker>

source§

fn set_position_marker(&mut self, _position_marker: Option<PositionMarker>)

source§

fn segments(&self) -> &[ErasedSegment]

source§

fn get_raw_segments(&self) -> Vec<ErasedSegment>

Iterate raw segments, mostly for searching. Read more
source§

fn get_uuid(&self) -> Option<Uuid>

source§

fn get_source_fixes(&self) -> Vec<SourceFix>

Return any source fixes as list.
source§

fn class_types(&self) -> AHashSet<&'static str>

source§

fn reference(&self) -> Node<ObjectReferenceSegment>

source§

fn type_name(&self) -> &'static str

source§

fn get_start_loc(&self) -> (usize, usize)

source§

fn get_end_loc(&self) -> (usize, usize)

source§

fn to_serialised( &self, code_only: bool, show_raw: bool, include_meta: bool ) -> TupleSerialisedSegment

source§

fn select_children( &self, start_seg: Option<&ErasedSegment>, stop_seg: Option<&ErasedSegment>, select_if: Option<fn(_: &ErasedSegment) -> bool>, loop_while: Option<fn(_: &ErasedSegment) -> bool> ) -> Vec<ErasedSegment>

source§

fn is_templated(&self) -> bool

source§

fn iter_segments( &self, expanding: Option<&[&str]>, pass_through: bool ) -> Vec<ErasedSegment>

source§

fn recursive_crawl_all(&self, reverse: bool) -> Vec<ErasedSegment>

source§

fn recursive_crawl( &self, seg_types: &[&str], recurse_into: bool, no_recursive_seg_type: Option<&str>, allow_self: bool ) -> Vec<ErasedSegment>

source§

fn code_indices(&self) -> Vec<usize>

source§

fn get_parent(&self) -> Option<ErasedSegment>

source§

fn child(&self, seg_types: &[&str]) -> Option<ErasedSegment>

source§

fn children(&self, seg_types: &[&str]) -> Vec<ErasedSegment>

source§

fn iter_patches(&self, templated_file: &TemplatedFile) -> Vec<FixPatch>

source§

fn descendant_type_set(&self) -> AHashSet<&'static str>

source§

fn match_grammar(&self) -> Option<Arc<dyn Matchable>>

source§

fn get_raw_upper(&self) -> Option<String>

source§

fn first_non_whitespace_segment_raw_upper(&self) -> Option<String>

source§

fn is_type(&self, type_: &str) -> bool

source§

fn is_meta(&self) -> bool

source§

fn get_default_raw(&self) -> Option<&'static str>

source§

fn gather_segments(&self) -> Vec<ErasedSegment>

source§

fn get_matched_length(&self) -> usize

Return the length of the segment in characters.
source§

fn get_can_start_end_non_code(&self) -> bool

Are we able to have non-code at the start or end?
source§

fn get_allow_empty(&self) -> bool

Can we allow it to be empty? Usually used in combination with the can_start_end_non_code.
source§

fn get_file_path(&self) -> Option<String>

get_file_path returns the file path of the segment if it is a file segment.
source§

fn iter_source_fix_patches( &self, templated_file: &TemplatedFile ) -> Vec<FixPatch>

Yield any source patches as fixes now. Read more
source§

fn edit( &self, raw: Option<String>, source_fixes: Option<Vec<SourceFix>> ) -> ErasedSegment

Stub.
source§

fn compute_anchor_edit_info( &self, fixes: &Vec<LintFix> ) -> AHashMap<Uuid, AnchorEditInfo>

Group and count fixes by anchor, return dictionary.
source§

fn instance_types(&self) -> AHashSet<&'static str>

source§

fn combined_types(&self) -> AHashSet<&'static str>

source§

fn apply_fixes( &self, dialect: &Dialect, fixes: AHashMap<Uuid, AnchorEditInfo> ) -> (ErasedSegment, Vec<ErasedSegment>, Vec<ErasedSegment>, bool)

source§

impl StructuralPartialEq for ComparisonOperatorSegment

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneSegment for T
where T: Segment,

source§

impl<T> Config for T

source§

fn config(self, f: impl FnOnce(&mut Self)) -> Self

source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> DynEq for T
where T: Any + PartialEq,

source§

fn as_any(&self) -> &(dyn Any + 'static)

source§

fn dyn_eq(&self, other: &(dyn DynEq + 'static)) -> bool

source§

impl<T> DynHash for T
where T: Hash + ?Sized,

source§

fn dyn_hash(&self, state: &mut dyn Hasher)

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToErasedSegment for T
where T: Segment,

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Any for T
where T: Any,

source§

impl<T> CloneAny for T
where T: Any + Clone,