update lib docs

This commit is contained in:
jazzfool 2024-09-21 13:27:33 +10:00
parent f649ec93da
commit 5d87dbdf88

View file

@ -8,33 +8,25 @@
//! Example:
//! ```rust
//! use iced_video_player::{Video, VideoPlayer};
//! use iced::{Sandbox, Element};
//!
//! # #![allow(clippy::needless_doctest_main)]
//! fn main() {
//! App::run(Default::default());
//! fn main() -> iced::Result {
//! iced::run("Video Player", (), App::view)
//! }
//!
//! struct App {
//! video: Video,
//! }
//!
//! impl Sandbox for App {
//! type Message = ();
//!
//! fn new() -> Self {
//! impl Default for App {
//! fn default() -> Self {
//! App {
//! video: Video::new(&url::Url::parse("file:///C:/my_video.mp4").unwrap()).unwrap(),
//! }
//! }
//!
//! fn title(&self) -> String {
//! String::from("Video Player")
//! }
//!
//! fn update(&mut self, _message: ()) {}
//!
//! fn view(&mut self) -> Element<()> {
//! impl App {
//! fn view(&self) -> iced::Element<()> {
//! VideoPlayer::new(&self.video).into()
//! }
//! }