pub struct DjvuDocument {
ctx: Rc<DjvuContext>,
doc: *mut ExoDocument,
}Fields§
§ctx: Rc<DjvuContext>§doc: *mut ExoDocumentImplementations§
Source§impl DjvuDocument
impl DjvuDocument
pub fn page(&self, index: usize) -> Option<DjvuPage<'_>>
fn text( &mut self, loc: Location, kind: &[u8], ) -> Option<(Vec<BoundedText>, usize)>
fn walk_text( exp: *mut MiniExp, height: i32, kind: &[u8], index: usize, offset: &mut usize, data: &mut Vec<BoundedText>, )
fn walk_toc(exp: *mut MiniExp, index: &mut usize) -> Vec<TocEntry>
pub fn year(&self) -> Option<String>
pub fn publisher(&self) -> Option<String>
pub fn series(&self) -> Option<String>
Trait Implementations§
Source§impl Document for DjvuDocument
impl Document for DjvuDocument
fn dims(&self, index: usize) -> Option<(f32, f32)>
fn pages_count(&self) -> usize
fn pixmap( &mut self, loc: Location, scale: f32, samples: usize, ) -> Option<(Pixmap, usize)>
fn toc(&mut self) -> Option<Vec<TocEntry>>
fn chapter<'a>( &mut self, offset: usize, toc: &'a [TocEntry], ) -> Option<(&'a TocEntry, f32)>
fn chapter_relative<'a>( &mut self, offset: usize, dir: CycleDir, toc: &'a [TocEntry], ) -> Option<&'a TocEntry>
fn words(&mut self, loc: Location) -> Option<(Vec<BoundedText>, usize)>
fn lines(&mut self, loc: Location) -> Option<(Vec<BoundedText>, usize)>
fn links(&mut self, loc: Location) -> Option<(Vec<BoundedText>, usize)>
fn images(&mut self, _loc: Location) -> Option<(Vec<Boundary>, usize)>
fn metadata(&self, key: &str) -> Option<String>
fn title(&self) -> Option<String>
fn is_reflowable(&self) -> bool
fn layout(&mut self, _width: u32, _height: u32, _font_size: f32, _dpi: u16)
fn set_text_align(&mut self, _text_align: TextAlign)
fn set_font_family(&mut self, _family_name: &str, _search_path: &str)
fn set_margin_width(&mut self, _width: i32)
fn set_line_height(&mut self, _line_height: f32)
fn set_hyphen_penalty(&mut self, _hyphen_penalty: i32)
fn set_stretch_tolerance(&mut self, _stretch_tolerance: f32)
fn set_ignore_document_css(&mut self, _ignore: bool)
fn has_synthetic_page_numbers(&self) -> bool
fn save(&self, _path: &str) -> Result<(), Error>
fn preview_pixmap( &mut self, width: f32, height: f32, samples: usize, ) -> Option<Pixmap>
fn resolve_location(&mut self, loc: Location) -> Option<usize>
Source§impl Drop for DjvuDocument
impl Drop for DjvuDocument
impl Send for DjvuDocument
impl Sync for DjvuDocument
Auto Trait Implementations§
impl Freeze for DjvuDocument
impl RefUnwindSafe for DjvuDocument
impl Unpin for DjvuDocument
impl UnwindSafe for DjvuDocument
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> 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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.