[][src]Enum pdf::error::PdfError

pub enum PdfError {
    EOF,
    Parse {
        source: Box<dyn Error + Send + Sync>,
    },
    Encoding {
        source: Box<dyn Error + Send + Sync>,
    },
    Bounds {
        index: usize,
        len: usize,
    },
    UnexpectedLexeme {
        pos: usize,
        lexeme: String,
        expected: &'static str,
    },
    UnknownType {
        pos: usize,
        first_lexeme: String,
        rest: String,
    },
    UnknownVariant {
        id: &'static str,
        name: String,
    },
    NotFound {
        word: String,
    },
    Reference,
    XRefStreamType {
        found: u64,
    },
    ContentReadPastBoundary,
    HexDecode {
        pos: usize,
        bytes: [u8; 2],
    },
    Ascii85TailError,
    IncorrectPredictorType {
        n: u8,
    },
    FromPrimitive {
        typ: &'static str,
        field: &'static str,
        source: Box<PdfError>,
    },
    MissingEntry {
        typ: &'static str,
        field: String,
    },
    KeyValueMismatch {
        key: String,
        value: String,
        found: String,
    },
    WrongDictionaryType {
        expected: String,
        found: String,
    },
    FreeObject {
        obj_nr: u64,
    },
    NullRef {
        obj_nr: u64,
    },
    UnexpectedPrimitive {
        expected: &'static str,
        found: &'static str,
    },
    ObjStmOutOfBounds {
        index: usize,
        max: usize,
    },
    PageOutOfBounds {
        page_nr: u32,
        max: u32,
    },
    PageNotFound {
        page_nr: u32,
    },
    UnspecifiedXRefEntry {
        id: ObjNr,
    },
    InvalidPassword,
    DecryptionFailure,
    Jpeg {
        source: Error,
    },
    Io {
        source: Error,
    },
    Other {
        msg: String,
    },
    NoneError {
        file: &'static str,
        line: u32,
        column: u32,
    },
    Try {
        file: &'static str,
        line: u32,
        column: u32,
        source: Box<PdfError>,
    },
    TryContext {
        file: &'static str,
        line: u32,
        column: u32,
        context: Vec<(&'static str, String)>,
        source: Box<PdfError>,
    },
}

Variants

EOF
Parse

Fields of Parse

source: Box<dyn Error + Send + Sync>
Encoding

Fields of Encoding

source: Box<dyn Error + Send + Sync>
Bounds

Fields of Bounds

index: usizelen: usize
UnexpectedLexeme

Fields of UnexpectedLexeme

pos: usizelexeme: Stringexpected: &'static str
UnknownType

Fields of UnknownType

pos: usizefirst_lexeme: Stringrest: String
UnknownVariant

Fields of UnknownVariant

id: &'static strname: String
NotFound

Fields of NotFound

word: String
Reference
XRefStreamType

Fields of XRefStreamType

found: u64
ContentReadPastBoundary
HexDecode

Fields of HexDecode

pos: usizebytes: [u8; 2]
Ascii85TailError
IncorrectPredictorType

Fields of IncorrectPredictorType

n: u8
FromPrimitive

Fields of FromPrimitive

typ: &'static strfield: &'static strsource: Box<PdfError>
MissingEntry

Fields of MissingEntry

typ: &'static strfield: String
KeyValueMismatch

Fields of KeyValueMismatch

key: Stringvalue: Stringfound: String
WrongDictionaryType

Fields of WrongDictionaryType

expected: Stringfound: String
FreeObject

Fields of FreeObject

obj_nr: u64
NullRef

Fields of NullRef

obj_nr: u64
UnexpectedPrimitive

Fields of UnexpectedPrimitive

expected: &'static strfound: &'static str
ObjStmOutOfBounds

Fields of ObjStmOutOfBounds

index: usizemax: usize
PageOutOfBounds

Fields of PageOutOfBounds

page_nr: u32max: u32
PageNotFound

Fields of PageNotFound

page_nr: u32
UnspecifiedXRefEntry

Fields of UnspecifiedXRefEntry

id: ObjNr
InvalidPassword
DecryptionFailure
Jpeg

Fields of Jpeg

source: Error
Io

Fields of Io

source: Error
Other

Fields of Other

msg: String
NoneError

Fields of NoneError

file: &'static strline: u32column: u32
Try

Fields of Try

file: &'static strline: u32column: u32source: Box<PdfError>
TryContext

Fields of TryContext

file: &'static strline: u32column: u32context: Vec<(&'static str, String)>source: Box<PdfError>

Implementations

impl PdfError[src]

pub fn trace(&self)[src]

pub fn is_eof(&self) -> bool[src]

Trait Implementations

impl Debug for PdfError[src]

impl Display for PdfError[src]

impl Error for PdfError where
    Self: Debug + Display
[src]

impl ErrorCompat for PdfError[src]

impl From<Error> for PdfError[src]

impl From<Error> for PdfError[src]

impl From<FromUtf16Error> for PdfError[src]

impl From<FromUtf8Error> for PdfError[src]

impl From<Infallible> for PdfError[src]

impl From<ParseIntError> for PdfError[src]

impl From<String> for PdfError[src]

impl From<Utf8Error> for PdfError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsErrorSource for T where
    T: 'static + Error
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.