#[repr(C, packed(1))]pub struct Range {
pub location: UInteger,
pub length: UInteger,
}Expand description
A structure used to describe a portion of a series.
C++ equivalent: NS::Range
Fields§
§location: UIntegerThe start index of the range.
length: UIntegerThe number of items in the range.
Implementations§
Source§impl Range
impl Range
Sourcepub const fn new(location: UInteger, length: UInteger) -> Self
pub const fn new(location: UInteger, length: UInteger) -> Self
Create a new range.
C++ equivalent: NS::Range::Range(UInteger loc, UInteger len)
Sourcepub const fn make(location: UInteger, length: UInteger) -> Self
pub const fn make(location: UInteger, length: UInteger) -> Self
Create a new range (static factory method).
C++ equivalent: NS::Range::Make(UInteger loc, UInteger len)
Sourcepub const fn equal(&self, other: &Range) -> bool
pub const fn equal(&self, other: &Range) -> bool
Check if two ranges are equal.
C++ equivalent: NS::Range::Equal(const Range& range) const
Sourcepub const fn location_in_range(&self, loc: UInteger) -> bool
pub const fn location_in_range(&self, loc: UInteger) -> bool
Check if a location is within this range.
C++ equivalent: NS::Range::LocationInRange(UInteger loc) const
Trait Implementations§
impl Copy for Range
impl Eq for Range
impl StructuralPartialEq for Range
Auto Trait Implementations§
impl Freeze for Range
impl RefUnwindSafe for Range
impl Send for Range
impl Sync for Range
impl Unpin for Range
impl UnwindSafe for Range
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