pub struct SegmentRef<'a, T: Element> {
pub element: &'a T,
pub timing: &'a Timing,
pub name: &'a Option<String>,
}
Expand description
A typed view of a Segment
(references to its fields).
Fields§
§element: &'a T
The element reference.
timing: &'a Timing
The segment’s timing reference.
name: &'a Option<String>
The segment’s name reference.
Trait Implementations§
Source§impl<'a, T: Element> Clone for SegmentRef<'a, T>
impl<'a, T: Element> Clone for SegmentRef<'a, T>
Source§impl<'a, T: Element> From<&SegmentRef<'a, T>> for Range<i32>
impl<'a, T: Element> From<&SegmentRef<'a, T>> for Range<i32>
Source§fn from(value: &SegmentRef<'a, T>) -> Self
fn from(value: &SegmentRef<'a, T>) -> Self
Converts to this type from the input type.
Source§impl<'a, T: Element> From<&SegmentRef<'a, T>> for Timing
impl<'a, T: Element> From<&SegmentRef<'a, T>> for Timing
Source§fn from(value: &SegmentRef<'a, T>) -> Self
fn from(value: &SegmentRef<'a, T>) -> Self
Converts to this type from the input type.
Source§impl<'a, T: Element> From<SegmentRef<'a, T>> for Range<i32>
impl<'a, T: Element> From<SegmentRef<'a, T>> for Range<i32>
Source§fn from(value: SegmentRef<'a, T>) -> Self
fn from(value: SegmentRef<'a, T>) -> Self
Converts to this type from the input type.
Source§impl<'a, T: Element> From<SegmentRef<'a, T>> for Timing
impl<'a, T: Element> From<SegmentRef<'a, T>> for Timing
Source§fn from(value: SegmentRef<'a, T>) -> Self
fn from(value: SegmentRef<'a, T>) -> Self
Converts to this type from the input type.
Source§impl<'a, T> IntoSegment for SegmentRef<'a, T>
impl<'a, T> IntoSegment for SegmentRef<'a, T>
Source§fn into_segment(self, timing: impl Into<Timing>) -> Segment
fn into_segment(self, timing: impl Into<Timing>) -> Segment
Turns this SegmentRef
into a new Segment
with a given
timing
.
Note: This also copies the name
if it exists. If this is not desired, use:
let segment = segment_ref.into_segment(timing).unnamed();
Source§impl<'a, T: Element> RangeBounds<i32> for SegmentRef<'a, T>
impl<'a, T: Element> RangeBounds<i32> for SegmentRef<'a, T>
impl<'a, T: Element> Copy for SegmentRef<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for SegmentRef<'a, T>
impl<'a, T> RefUnwindSafe for SegmentRef<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for SegmentRef<'a, T>where
T: Sync,
impl<'a, T> Sync for SegmentRef<'a, T>where
T: Sync,
impl<'a, T> Unpin for SegmentRef<'a, T>
impl<'a, T> UnwindSafe for SegmentRef<'a, T>where
T: RefUnwindSafe,
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, R> RangeOps<T> for Rwhere
T: PartialOrd,
R: RangeBounds<T>,
impl<T, R> RangeOps<T> for Rwhere
T: PartialOrd,
R: RangeBounds<T>,
Source§fn is_before(&self, other: &impl RangeBounds<T>) -> bool
fn is_before(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval ends before the start of another.
Source§fn is_after(&self, other: &impl RangeBounds<T>) -> bool
fn is_after(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval starts after the end of another.
Source§fn is_disjoint_from(&self, other: &impl RangeBounds<T>) -> bool
fn is_disjoint_from(&self, other: &impl RangeBounds<T>) -> bool
Checks if an interval has no overlap with another.
Source§fn intersects(&self, other: &impl RangeBounds<T>) -> bool
fn intersects(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval has some overlap with another.
Source§fn contains_range(&self, other: &impl RangeBounds<T>) -> bool
fn contains_range(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval contains another.
Source§fn is_contained_by(&self, other: &impl RangeBounds<T>) -> bool
fn is_contained_by(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval is contained by another.
Source§fn begins_within(&self, other: &impl RangeBounds<T>) -> bool
fn begins_within(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval starts within another.
Source§fn ends_within(&self, other: &impl RangeBounds<T>) -> bool
fn ends_within(&self, other: &impl RangeBounds<T>) -> bool
Checks if this interval ends within another.