Debian Codegraph @

src/lz4f/error.rs

raw symbols SCIP
1 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{convertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/, fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/, iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/};
2
3 /// A list specifying general categories of LZ4F error.
4 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:)]
5 #[non_exhaustive]
6 #[allow(missing_docs)]
7 pub enum ErrorKindrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind# {
8 Genericrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#Generic#,
9 MaxBlockSizeInvalidrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#MaxBlockSizeInvalid#,
10 BlockModeInvalidrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#BlockModeInvalid#,
11 ContentChecksumFlagInvalidrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#ContentChecksumFlagInvalid#,
12 CompressionLevelInvalidrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#CompressionLevelInvalid#,
13 HeaderVersionWrongrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#HeaderVersionWrong#,
14 BlockChecksumInvalidrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#BlockChecksumInvalid#,
15 ReservedFlagSetrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#ReservedFlagSet#,
16 AllocationFailedrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#AllocationFailed#,
17 SrcSizeTooLargerust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#SrcSizeTooLarge#,
18 DstMaxSizeTooSmallrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#DstMaxSizeTooSmall#,
19 FrameHeaderIncompleterust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#FrameHeaderIncomplete#,
20 FrameTypeUnknownrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#FrameTypeUnknown#,
21 FrameSizeWrongrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#FrameSizeWrong#,
22 SrcPtrWrongrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#SrcPtrWrong#,
23 DecompressionFailedrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#DecompressionFailed#,
24 HeaderChecksumInvalidrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#HeaderChecksumInvalid#,
25 ContentChecksumInvalidrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#ContentChecksumInvalid#,
26 FrameDecodingAlreadyStartedrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#FrameDecodingAlreadyStarted#,
27 }
28
29 impl fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for ErrorKindrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind# {
30 fn fmtrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[ErrorKind][Display]fmt().(&self, f: &mut stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Error#> {
31 <Selfrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[ErrorKind][Display] as fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug#>::fmtrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[ErrorKind][Debug]fmt().(self, f)
32 }
33 }
34
35 /// The error type for LZ4F operations.
36 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:)]
37 pub enum Errorrust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error# {
38 Lz4frust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error#Lz4f#(ErrorKindrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#),
39 Commonrust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error#Common#(craterust-analyzer cargo lzzzz 2.0.0 crate/::ErrorKindrust-analyzer cargo lzzzz 2.0.0 common/error/ErrorKind#),
40 }
41
42 impl Errorrust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error# {
43 pub(superrust-analyzer cargo lzzzz 2.0.0 lz4f/) const fn newrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[Error]new().(kind: ErrorKindrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind#) -> Selfrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[Error] {
44 Selfrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[Error]::Lz4frust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error#Lz4f#(kind)
45 }
46 }
47
48 impl convertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/::Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<Errorrust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error#> for iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error# {
49 fn fromrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[`io::Error`][`From<Error>`]from().(err: Errorrust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error#) -> Selfrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[`io::Error`][`From<Error>`] {
50 Selfrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[`io::Error`][`From<Error>`]::newrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/impl#[Error]new().(iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::ErrorKindrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#::Otherrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/ErrorKind#Other#, err)
51 }
52 }
53
54 impl convertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/::Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<craterust-analyzer cargo lzzzz 2.0.0 crate/::Errorrust-analyzer cargo lzzzz 2.0.0 common/error/Error#> for Errorrust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error# {
55 fn fromrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[Error][`From<crate::Error>`]from().(err: craterust-analyzer cargo lzzzz 2.0.0 crate/::Errorrust-analyzer cargo lzzzz 2.0.0 common/error/Error#) -> Selfrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[Error][`From<crate::Error>`] {
56 Selfrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[Error][`From<crate::Error>`]::Commonrust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error#Common#(err.kindrust-analyzer cargo lzzzz 2.0.0 common/error/impl#[Error]kind().())
57 }
58 }
59
60 impl fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for Errorrust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error# {
61 fn fmtrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[Error][Display]fmt().(&self, f: &mut stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Error#> {
62 match self {
63 Selfrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[Error][Display]::Lz4frust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error#Lz4f#(kind) => <ErrorKindrust-analyzer cargo lzzzz 2.0.0 lz4f/error/ErrorKind# as fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#>::fmtrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[ErrorKind][Display]fmt().(kind, f),
64 Selfrust-analyzer cargo lzzzz 2.0.0 lz4f/error/impl#[Error][Display]::Commonrust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error#Common#(kind) => <craterust-analyzer cargo lzzzz 2.0.0 crate/::ErrorKindrust-analyzer cargo lzzzz 2.0.0 common/error/ErrorKind# as fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#>::fmtrust-analyzer cargo lzzzz 2.0.0 common/error/impl#[ErrorKind][Display]fmt().(kind, f),
65 }
66 }
67 }
68
69 impl stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std error/::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# for Errorrust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error# {}
70
71 /// A specialized [`Result`] type for LZ4F operations.
72 ///
73 /// [`Result`]: https://doc.rust-lang.org/std/result/enum.Result.html
74 pub type Resultrust-analyzer cargo lzzzz 2.0.0 lz4f/error/Result#<T> = stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<T, Errorrust-analyzer cargo lzzzz 2.0.0 lz4f/error/Error#>;