pub struct ImageContext<'a> {
pub preceding_text: Option<&'a str>,
pub following_text: Option<&'a str>,
}Expand description
Text surrounding the image, for understand_image’s description branch — a
caption-less photo described with “a bar chart” is far less useful than one
described with the surrounding paragraph’s subject folded in.
Both fields are optional and independent: a page boundary may have preceding text but no following text (last image on a page) or vice versa.
Fields§
§preceding_text: Option<&'a str>Text immediately before the image (same page, or the previous page’s last paragraph at a page boundary).
following_text: Option<&'a str>Text immediately after the image (same page, or the next page’s first paragraph at a page boundary).
Trait Implementations§
Source§impl<'a> Clone for ImageContext<'a>
impl<'a> Clone for ImageContext<'a>
impl<'a> Copy for ImageContext<'a>
Source§impl<'a> Debug for ImageContext<'a>
impl<'a> Debug for ImageContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for ImageContext<'a>
impl<'a> RefUnwindSafe for ImageContext<'a>
impl<'a> Send for ImageContext<'a>
impl<'a> Sync for ImageContext<'a>
impl<'a> Unpin for ImageContext<'a>
impl<'a> UnsafeUnpin for ImageContext<'a>
impl<'a> UnwindSafe for ImageContext<'a>
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