Skip to main content

FrameErrorInner

Enum FrameErrorInner 

Source
pub enum FrameErrorInner {
Show 23 variants Io { source: Error, }, IncompleteBlock { read: usize, }, InvalidIdentity { found: [u8; 8], }, InvalidChecksum { expected: Option<u64>, actual: u64, }, InvalidSize { found: [u8; 12], }, InvalidNumericField { field: &'static str, found: Vec<u8>, }, UnterminatedUstarStringField { field: &'static str, }, UnsupportedTypeflag { typeflag: u8, }, FormatMismatch { expected: ArchiveFormat, found: ArchiveFormat, }, UnexpectedOrder { expected: &'static str, found: &'static str, }, InvalidPaxRecord { source: PaxError, }, ExtensionTooLarge { format: ArchiveFormat, size: u64, limit: u64, }, GlobalPaxExtensionsTooLarge { size: u64, limit: u64, }, InvalidGnuMetadata { kind: GnuKind, reason: &'static str, }, DeletedPaxMetadata { keyword: &'static str, }, EmptyMemberPath, NulInMemberName { field: &'static str, }, ArithmeticOverflow { context: &'static str, }, InvalidMemberSize { kind: UstarKind, size: u64, }, TruncatedPayload { owner: DataOwner, remaining: u64, }, UnexpectedEof { expected: &'static str, }, MissingEndMarker, InvalidEndMarker,
}
Expand description

Specific errors that can occur while processing tar frames.

Variants§

§

Io

The underlying reader failed.

Fields

§source: Error

The underlying I/O failure.

§

IncompleteBlock

The underlying stream ended in the middle of a logical block.

Fields

§read: usize

The number of bytes received for the incomplete block.

§

InvalidIdentity

A header did not identify either supported archive family.

Fields

§found: [u8; 8]

The bytes found in the combined magic/version fields.

§

InvalidChecksum

A header checksum was malformed or did not match its contents.

Fields

§expected: Option<u64>

The parsed stored checksum, or None if its field was malformed.

§actual: u64

The checksum computed from the header block.

§

InvalidSize

A header’s size field was not a strict number. The underlying format of the number might be octal or GNU-style base256.

Fields

§found: [u8; 12]

The bytes found in the size field.

§

InvalidNumericField

An ordinary member header’s numeric metadata field was invalid.

Fields

§field: &'static str

The name of the invalid header field.

§found: Vec<u8>

The bytes found in the invalid header field.

§

UnterminatedUstarStringField

An ordinary ustar member header’s string field had no NUL terminator.

Fields

§field: &'static str

The name of the unterminated header field.

§

UnsupportedTypeflag

A tar type is not supported within the selected archive family.

Fields

§typeflag: u8

The unsupported typeflag byte.

§

FormatMismatch

A header from another archive family appeared after family detection.

Fields

§expected: ArchiveFormat

The archive family selected by an earlier header.

§found: ArchiveFormat

The archive family identified by this header.

§

UnexpectedOrder

A valid block appeared in a position where another block type was required.

Fields

§expected: &'static str

A description of the required block.

§found: &'static str

A description of the block received.

§

InvalidPaxRecord

A pax extended-header record could not be parsed.

Fields

§source: PaxError

The pax parsing failure.

§

ExtensionTooLarge

A metadata extension declares more data than the configured format limit.

Fields

§format: ArchiveFormat

The archive family containing the extension.

§size: u64

The extension payload size declared in its header.

§limit: u64

The configured maximum extension payload size.

§

GlobalPaxExtensionsTooLarge

Consecutive global pax extensions contain more metadata than the configured limit.

Fields

§size: u64

The cumulative declared size including the rejected extension.

§limit: u64

The configured maximum cumulative payload size.

§

InvalidGnuMetadata

A GNU long-name or long-link metadata payload is not a valid value.

Fields

§kind: GnuKind

The GNU metadata extension being decoded.

§reason: &'static str

The reason the metadata value was rejected.

§

DeletedPaxMetadata

A pax record removed metadata required to interpret a member.

Fields

§keyword: &'static str

The standard pax keyword that deleted its header fallback.

§

EmptyMemberPath

An ordinary member has no effective pathname after applying extensions.

§

NulInMemberName

An effective member path or link target contains an embedded NUL byte.

Fields

§field: &'static str

The effective metadata field containing the NUL byte.

§

ArithmeticOverflow

A framing offset or record length overflowed.

Fields

§context: &'static str

The computation that overflowed.

§

InvalidMemberSize

A member’s declared or effective size is invalid for its type.

Fields

§kind: UstarKind

The member type.

§size: u64

The rejected declared or effective payload size.

§

TruncatedPayload

The stream ended while a payload still required bytes.

Fields

§owner: DataOwner

The kind of payload being read.

§remaining: u64

The remaining unpadded payload length.

§

UnexpectedEof

The stream ended while a required member header was pending.

Fields

§expected: &'static str

A description of the required next input.

§

MissingEndMarker

The two-block end marker was absent or incomplete.

§

InvalidEndMarker

The first zero terminator block was not followed by a second zero block.

Trait Implementations§

Source§

impl Debug for FrameErrorInner

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FrameErrorInner

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for FrameErrorInner

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.