pub struct IdxSpan {
pub start: i64,
pub end: i64,
}Expand description
Half-open span of logical indices, start..end.
Used instead of Range<i64> because Range is not Copy, and everything that
ends up in a Frame must be.
§Examples
use ferrochart_core::data::IdxSpan;
let span = IdxSpan { start: -2, end: 3 };
assert_eq!(span.len(), 5);
assert!(!span.is_empty());
assert!(IdxSpan { start: 4, end: 4 }.is_empty());Fields§
§start: i64First logical index in the span.
end: i64One past the last logical index in the span.
Implementations§
Trait Implementations§
impl Copy for IdxSpan
impl Eq for IdxSpan
impl StructuralPartialEq for IdxSpan
Auto Trait Implementations§
impl Forget for IdxSpan
impl Freeze for IdxSpan
impl Move for IdxSpan
impl RefUnwindSafe for IdxSpan
impl Send for IdxSpan
impl Sync for IdxSpan
impl Unpin for IdxSpan
impl UnsafeUnpin for IdxSpan
impl UnwindSafe for IdxSpan
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