pub struct DiffGutterMarker { /* private fields */ }Expand description
An interactive marker in the lane between the line numbers and the code, such as a comment or diagnostic indicator that opens a details panel.
The application renders it with super::Diff::render_gutter_marker,
usually as a small button, and owns the panel and its focus.
Implementations§
Source§impl DiffGutterMarker
impl DiffGutterMarker
Sourcepub fn new(id: impl Into<ElementId>, position: DiffLinePosition) -> Self
pub fn new(id: impl Into<ElementId>, position: DiffLinePosition) -> Self
Places a marker beside a source line.
Sourcepub fn with_label(self, label: impl Into<SharedString>) -> Self
pub fn with_label(self, label: impl Into<SharedString>) -> Self
Sets the accessible label that the rendered marker should announce.
pub fn id(&self) -> &ElementId
pub fn position(&self) -> &DiffLinePosition
pub fn label(&self) -> &SharedString
Trait Implementations§
Auto Trait Implementations§
impl Forget for DiffGutterMarker
impl Freeze for DiffGutterMarkerwhere
NonZero<u32>: Freeze,
&'static str: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const ArcInner<Path> is !null: Freeze,
PhantomData<ArcInner<Path>>: Freeze,
*const str is !null: Freeze,
PhantomData<&'static str>: Freeze,
*const ArcInner<ElementId> is !null: Freeze,
PhantomData<ArcInner<ElementId>>: Freeze,
impl Move for DiffGutterMarker
impl RefUnwindSafe for DiffGutterMarker
impl Send for DiffGutterMarker
impl Sync for DiffGutterMarker
impl Unpin for DiffGutterMarker
impl UnsafeUnpin for DiffGutterMarkerwhere
NonZeroU32Inner: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<Path> is !null: UnsafeUnpin,
PhantomData<ArcInner<Path>>: UnsafeUnpin,
*const str is !null: UnsafeUnpin,
PhantomData<&'static str>: UnsafeUnpin,
*const ArcInner<ElementId> is !null: UnsafeUnpin,
PhantomData<ArcInner<ElementId>>: UnsafeUnpin,
impl UnwindSafe for DiffGutterMarkerwhere
NonZero<u32>: UnwindSafe,
&'static str: UnwindSafe,
Arc<str>: UnwindSafe,
Arc<Path>: UnwindSafe,
NonNull<str>: UnwindSafe,
Arc<ElementId>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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 more