pub struct YouTubeParser { /* private fields */ }
Expand description
YouTube URL parser for extracting video IDs from various URL formats
Implementations§
Source§impl YouTubeParser
impl YouTubeParser
Sourcepub fn parse_url(&self, url_str: &str) -> YdlResult<String>
pub fn parse_url(&self, url_str: &str) -> YdlResult<String>
Parse a YouTube URL and extract the video ID
Sourcepub fn is_valid_video_id(&self, video_id: &str) -> bool
pub fn is_valid_video_id(&self, video_id: &str) -> bool
Validate that a video ID matches YouTube’s format requirements
Sourcepub fn normalize_url(&self, url_str: &str) -> YdlResult<String>
pub fn normalize_url(&self, url_str: &str) -> YdlResult<String>
Normalize a URL to standard YouTube format
Sourcepub fn extract_video_id_direct(&self, input: &str) -> YdlResult<String>
pub fn extract_video_id_direct(&self, input: &str) -> YdlResult<String>
Extract video ID directly from string (if it’s already a video ID)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for YouTubeParser
impl RefUnwindSafe for YouTubeParser
impl Send for YouTubeParser
impl Sync for YouTubeParser
impl Unpin for YouTubeParser
impl UnwindSafe for YouTubeParser
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