pub struct MediaBlockRequest {
pub anchor_line: u32,
pub path: PathBuf,
pub alt: Option<String>,
pub fit: MediaFit,
}Expand description
One inline media block a producer wants drawn.
The native mirror of the WIT media-block (wit/media.wit). Note what is
absent: any size. The producer names a file and a line; the HOST resolves
the intrinsic dimensions and decides how many rows it reserves, so sizing
policy lives in one place and a plugin cannot claim arbitrary vertical
space in a buffer it does not own.
Fields§
§anchor_line: u320-based source line the block hangs below.
path: PathBufPath to the image, already resolved against the buffer’s directory.
alt: Option<String>What a renderer that cannot draw shows instead. None falls back to
the file name — never nothing.
fit: MediaFitHow the image’s intrinsic size maps into the block.
Trait Implementations§
Source§impl Clone for MediaBlockRequest
impl Clone for MediaBlockRequest
Source§fn clone(&self) -> MediaBlockRequest
fn clone(&self) -> MediaBlockRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MediaBlockRequest
impl Debug for MediaBlockRequest
impl Eq for MediaBlockRequest
Source§impl PartialEq for MediaBlockRequest
impl PartialEq for MediaBlockRequest
impl StructuralPartialEq for MediaBlockRequest
Auto Trait Implementations§
impl Freeze for MediaBlockRequest
impl RefUnwindSafe for MediaBlockRequest
impl Send for MediaBlockRequest
impl Sync for MediaBlockRequest
impl Unpin for MediaBlockRequest
impl UnsafeUnpin for MediaBlockRequest
impl UnwindSafe for MediaBlockRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.