pub struct MovieAssistant { /* private fields */ }Expand description
A question field over the films of a MovieLibrary. Each answer is a moment
of a film, and choosing one opens the film right there.
It looks only at the words the films hold, on this machine, with no model.
use ravenrs_movie::{MovieAssistant, MovieLibrary};
let assistant = MovieAssistant::new(MovieLibrary::new()).width(960.0);Implementations§
Source§impl MovieAssistant
impl MovieAssistant
Sourcepub fn new(library: MovieLibrary) -> Self
pub fn new(library: MovieLibrary) -> Self
An assistant over library, with an empty question.
Sourcepub fn width(self, width: f32) -> Self
pub fn width(self, width: f32) -> Self
The width of the whole assistant, in logical pixels (960 by default).
Sourcepub fn height(self, height: f32) -> Self
pub fn height(self, height: f32) -> Self
The height it should fit in: the film gets smaller rather than pushing its controls out of view. With none, the film takes the whole width.
Sourcepub fn narration(self, narration: Narration) -> Self
pub fn narration(self, narration: Narration) -> Self
Recordings of what the films say, in place of the system’s voice.
Sourcepub fn logo(self, logo: LottieAnimation) -> Self
pub fn logo(self, logo: LottieAnimation) -> Self
The app’s animated logo, played on the films’ opening and farewell cards.
Sourcepub fn labels(self, labels: AssistantLabels) -> Self
pub fn labels(self, labels: AssistantLabels) -> Self
The words it shows.
Trait Implementations§
Source§impl Debug for MovieAssistant
impl Debug for MovieAssistant
Auto Trait Implementations§
impl !RefUnwindSafe for MovieAssistant
impl !Send for MovieAssistant
impl !Sync for MovieAssistant
impl !UnwindSafe for MovieAssistant
impl Freeze for MovieAssistant
impl Unpin for MovieAssistant
impl UnsafeUnpin for MovieAssistant
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<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<V> ViewExt for Vwhere
V: View,
impl<V> ViewExt for Vwhere
V: View,
Source§fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
Adds padding inside the box, in logical pixels.
Source§fn background(self, fill: impl Into<Fill>) -> Styled<Self>
fn background(self, fill: impl Into<Fill>) -> Styled<Self>
Paints a background behind the content.
Source§fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
Fixes the width and/or height in logical pixels;
None keeps the content size.