pub struct ChangeId(/* private fields */);Expand description
Implementations§
Source§impl ChangeId
impl ChangeId
pub fn new(path: AttrPath) -> Self
Sourcepub fn parse(s: &str) -> Result<Self, AttrPathParseError>
pub fn parse(s: &str) -> Result<Self, AttrPathParseError>
Parse a dotted attribute path. Quoted segments (e.g. "hls-1.10")
retain dots that would otherwise act as separators.
pub fn path(&self) -> &AttrPath
Sourcepub fn input(&self) -> &Segment
pub fn input(&self) -> &Segment
Top-level input segment: the segment before the first dot, or the whole path if it has only one segment.
Sourcepub fn follows(&self) -> Option<&Segment>
pub fn follows(&self) -> Option<&Segment>
Second segment, if the path has more than one segment.
Sourcepub fn matches_with_follows(
&self,
input: &Segment,
follows: Option<&Segment>,
) -> bool
pub fn matches_with_follows( &self, input: &Segment, follows: Option<&Segment>, ) -> bool
Match against an explicit (input, follows) pair.
Sourcepub fn matches_with_ctx(&self, follows: &Segment, ctx: Option<Context>) -> bool
pub fn matches_with_ctx(&self, follows: &Segment, ctx: Option<Context>) -> bool
Match against the surrounding walker [Context], which carries the
enclosing top-level input.
Trait Implementations§
impl StructuralPartialEq for ChangeId
Auto Trait Implementations§
impl Freeze for ChangeId
impl RefUnwindSafe for ChangeId
impl Send for ChangeId
impl Sync for ChangeId
impl Unpin for ChangeId
impl UnsafeUnpin for ChangeId
impl UnwindSafe for ChangeId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more