pub enum Error {
Show 13 variants
Gvariant(Error),
InvalidChecksum(&'static str),
InvalidBase64(&'static str),
InvalidObjectType(u32),
InvalidVarint(&'static str),
InvalidXattrs(&'static str),
InvalidSizeEntry(&'static str),
KeyFile(String),
InvalidCommit(&'static str),
InvalidDirTree(&'static str),
InvalidDirMeta(&'static str),
InvalidFileHeader(&'static str),
InvalidRefPattern(String),
}Expand description
An error of the format primitives.
Each fallible function of this crate returns it, except
commit_timestamp. The I/O trait methods of
DeflateSink and
DeflateReader return std::io::Error. Most
variants hold a fixed message that names the reason.
Variants§
Gvariant(Error)
An encode or decode error of the GVariant codec.
InvalidChecksum(&'static str)
A checksum in hex, base64, or byte form that is not valid.
InvalidBase64(&'static str)
A base64 string with an invalid character or a truncated group.
InvalidObjectType(u32)
An object-type number that names no known type.
InvalidVarint(&'static str)
A LEB128 varint that is truncated, overflows 64 bits, or is not minimal.
InvalidXattrs(&'static str)
An xattr set with a name that is not valid.
The name is empty, a duplicate, out of sort order, or has a missing terminating NUL or an interior NUL.
InvalidSizeEntry(&'static str)
An ostree.sizes entry that is too short or has trailing bytes.
KeyFile(String)
A key file error.
These are the causes:
- The text does not parse.
- A value does not convert to the requested type.
- A set refuses a group name, a key, or a value.
InvalidCommit(&'static str)
A commit object with a parent or root checksum of an invalid length.
InvalidDirTree(&'static str)
A dirtree object that breaks an entry rule.
These are the causes:
- An entry name is not valid.
- An entry checksum is not 32 bytes.
- The names are not sorted.
- A name is in both the file and directory lists.
InvalidDirMeta(&'static str)
A dirmeta object with a mode that is not a directory mode.
InvalidFileHeader(&'static str)
A file header or a framed content stream that is not valid.
The header has a nonzero rdev, a mode that is not a regular file or a symlink, or a regular file with a symlink target. The framed stream is too short, has nonzero padding, or has a header length out of bounds. A header that is longer than the framing length limit also gives this error.
InvalidRefPattern(String)
A ref pattern that is not valid.
The text names the entry that failed. These are the causes:
- The pattern is empty, or it has an empty part.
- A part holds
*but is not*or**. - A literal part is not a valid ref-name component.
- A pattern holds
!, or a selector entry holds!after its first character.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()