Struct redact_composer_core::SegmentRef
source · 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> 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> 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, 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.