pub struct LabelManager { /* private fields */ }Expand description
Manages color labels and tags for clips.
Implementations§
Source§impl LabelManager
impl LabelManager
Sourcepub fn with_standard_labels() -> Self
pub fn with_standard_labels() -> Self
Create a label manager with standard production labels.
Sourcepub fn add_label(&mut self, label: ColorLabel)
pub fn add_label(&mut self, label: ColorLabel)
Add a custom color label.
Sourcepub fn remove_label(&mut self, name: &str) -> bool
pub fn remove_label(&mut self, name: &str) -> bool
Remove a color label by name.
Sourcepub fn all_labels(&self) -> &[ColorLabel]
pub fn all_labels(&self) -> &[ColorLabel]
Get all available labels.
Sourcepub fn get_label(&self, name: &str) -> Option<&ColorLabel>
pub fn get_label(&self, name: &str) -> Option<&ColorLabel>
Get a label by name.
Sourcepub fn set_clip_label(&mut self, clip_id: ClipId, label_name: &str) -> bool
pub fn set_clip_label(&mut self, clip_id: ClipId, label_name: &str) -> bool
Assign a color label to a clip.
Sourcepub fn remove_clip_label(&mut self, clip_id: ClipId) -> Option<String>
pub fn remove_clip_label(&mut self, clip_id: ClipId) -> Option<String>
Remove the color label from a clip.
Sourcepub fn get_clip_label(&self, clip_id: ClipId) -> Option<&ColorLabel>
pub fn get_clip_label(&self, clip_id: ClipId) -> Option<&ColorLabel>
Get the color label for a clip.
Sourcepub fn add_clip_tag(&mut self, clip_id: ClipId, tag: Tag)
pub fn add_clip_tag(&mut self, clip_id: ClipId, tag: Tag)
Add a tag to a clip.
Sourcepub fn remove_clip_tag(&mut self, clip_id: ClipId, key: &str) -> bool
pub fn remove_clip_tag(&mut self, clip_id: ClipId, key: &str) -> bool
Remove a tag from a clip by key.
Get all tags for a clip.
Sourcepub fn clips_with_tag(&self, key: &str, value: &str) -> Vec<ClipId> ⓘ
pub fn clips_with_tag(&self, key: &str, value: &str) -> Vec<ClipId> ⓘ
Find clips by tag key-value pair.
Sourcepub fn known_tag_keys(&self) -> Vec<&str>
pub fn known_tag_keys(&self) -> Vec<&str>
Get all known tag keys.
Sourcepub fn remove_clip(&mut self, clip_id: ClipId)
pub fn remove_clip(&mut self, clip_id: ClipId)
Remove all labels and tags for a clip.
Trait Implementations§
Source§impl Debug for LabelManager
impl Debug for LabelManager
Source§impl Default for LabelManager
impl Default for LabelManager
Source§fn default() -> LabelManager
fn default() -> LabelManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LabelManager
impl RefUnwindSafe for LabelManager
impl Send for LabelManager
impl Sync for LabelManager
impl Unpin for LabelManager
impl UnsafeUnpin for LabelManager
impl UnwindSafe for LabelManager
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more