Struct multi_buffer2::Anchor
source · pub struct Anchor {
pub buffer_id: Option<u64>,
pub excerpt_id: ExcerptId,
pub text_anchor: Anchor,
}
Fields§
§buffer_id: Option<u64>
§excerpt_id: ExcerptId
§text_anchor: Anchor
Implementations§
source§impl Anchor
impl Anchor
pub fn min() -> Self
pub fn max() -> Self
pub fn cmp(&self, other: &Anchor, snapshot: &MultiBufferSnapshot) -> Ordering
pub fn bias(&self) -> Bias
pub fn bias_left(&self, snapshot: &MultiBufferSnapshot) -> Anchor
pub fn bias_right(&self, snapshot: &MultiBufferSnapshot) -> Anchor
pub fn summary<D>(&self, snapshot: &MultiBufferSnapshot) -> Dwhere D: TextDimension + Ord + Sub<D, Output = D>,
pub fn is_valid(&self, snapshot: &MultiBufferSnapshot) -> bool
Trait Implementations§
source§impl PartialEq<Anchor> for Anchor
impl PartialEq<Anchor> for Anchor
source§impl ToOffsetUtf16 for Anchor
impl ToOffsetUtf16 for Anchor
fn to_offset_utf16(&self, snapshot: &MultiBufferSnapshot) -> OffsetUtf16
source§impl ToPoint for Anchor
impl ToPoint for Anchor
fn to_point<'a>(&self, snapshot: &MultiBufferSnapshot) -> Point
impl Copy for Anchor
impl Eq for Anchor
impl StructuralEq for Anchor
impl StructuralPartialEq for Anchor
Auto Trait Implementations§
impl RefUnwindSafe for Anchor
impl Send for Anchor
impl Sync for Anchor
impl Unpin for Anchor
impl UnwindSafe for Anchor
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.