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