Struct MediaCardProps
pub struct MediaCardProps {
pub key: String,
pub item: Option<ResourceId>,
pub title: Option<String>,
pub picture: Option<PictureSource>,
pub icon: Option<Icon>,
pub meta: Vec<String>,
pub aspect: Option<MediaAspect>,
pub selected: bool,
pub activate: Event,
pub pictures: Option<Pictures>,
}Expand description
One card of a grid: the art (a cover, a thumbnail, a photo) with its title and up to two meta lines under it. A press opens what it stands for.
Fields§
§key: StringThe card’s stable key.
item: Option<ResourceId>The resource the card stands for: what a press opens. Without one it is a picture with a title, which does nothing when pressed.
title: Option<String>What the card is called, under its art. Without one it is art only (a photo).
picture: Option<PictureSource>Its art: a picture by its address, loaded as it arrives.
icon: Option<Icon>The icon of a kind of thing, on the neutral tile: a podcast, a folder. Without a picture the placeholder shows the title’s initials.
meta: Vec<String>One line under the title (an artist, a channel, an author). Give two for two lines.
aspect: Option<MediaAspect>The shape of its art, square unless said.
selected: boolWhether it is the selected card.
activate: EventIt was pressed: open what it stands for.
pictures: Option<Pictures>The window’s pictures, through which a picture loads.
Trait Implementations§
§impl Component for MediaCardProps
impl Component for MediaCardProps
fn describe() -> Description
§fn from_source(source: &mut dyn Source) -> Result<MediaCardProps, Error>
fn from_source(source: &mut dyn Source) -> Result<MediaCardProps, Error>
source gives. Read more§impl Default for MediaCardProps
impl Default for MediaCardProps
§fn default() -> MediaCardProps
fn default() -> MediaCardProps
Auto Trait Implementations§
impl Freeze for MediaCardProps
impl !RefUnwindSafe for MediaCardProps
impl !Send for MediaCardProps
impl !Sync for MediaCardProps
impl Unpin for MediaCardProps
impl UnsafeUnpin for MediaCardProps
impl !UnwindSafe for MediaCardProps
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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