Enum las::Error

source ·
#[non_exhaustive]
pub enum Error {
Show 32 variants ClosedWriter, HeaderTooLarge(usize), InvalidClassification(u8), InvalidFileSignature([u8; 4]), InvalidInverseTransform { n: f64, transform: Transform, }, InvalidPointFormat(Format), InvalidPointFormatNumber(u8), InvalidScannerChannel(u8), Io(Error), LaszipNotEnabled, LasZipError(LasZipError), LasZipVlrNotFound, NotAscii(String), NotZeroFilled(Vec<u8>), OffsetToEvlrsTooSmall(u64), OffsetToPointDataTooLarge(usize), OffsetToPointDataTooSmall(u32), OverlapClassification, PointAttributesDoNotMatch(Format), PointDataRecordLengthTooLarge { format: Format, len: u16, }, PointPaddingNotAllowed, ReturnNumber { return_number: u8, version: Option<Version>, }, StringTooLong { string: String, len: usize, }, TooManyEvlrs(usize), TooManyPoints { n: u64, version: Version, }, TooManyVlrs(usize), TryFromIntError(TryFromIntError), UnsupportedFeature { version: Version, feature: &'static str, }, UnsupportedFormat { version: Version, format: Format, }, Utf8(Utf8Error), WktRequired(Format), VlrTooLong(usize),
}
Expand description

Crate-specific error enum.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ClosedWriter

The writer is closed.

§

HeaderTooLarge(usize)

The header size, as computed, is too large.

§

InvalidClassification(u8)

An invalid classification number.

§

InvalidFileSignature([u8; 4])

The file signature is not LASF.

§

InvalidInverseTransform

The value can’t have the inverse transform applied.

Fields

§n: f64

The float.

§transform: Transform

The transform that can’t be applied

§

InvalidPointFormat(Format)

This is an invalid point format.

It has a combination of options that can’t exist.

§

InvalidPointFormatNumber(u8)

This is an invalid format number.

§

InvalidScannerChannel(u8)

This is not a valid scanner channel

§

Io(Error)

§

LaszipNotEnabled

The las data is laszip compressed.

§

LasZipError(LasZipError)

Available on crate feature laz only.
§

LasZipVlrNotFound

Available on crate feature laz only.

The laszip vlr was not found, the points cannot be decompressed.

§

NotAscii(String)

This string is not ASCII.

§

NotZeroFilled(Vec<u8>)

These bytes are not zero-filled.

§

OffsetToEvlrsTooSmall(u64)

The offset to the start of the evlrs is too small.

§

OffsetToPointDataTooLarge(usize)

The offset to point data is too large.

§

OffsetToPointDataTooSmall(u32)

The offset to the point data was too small.

§

OverlapClassification

Overlap points are handled by an attribute on Point, not by a classification.

§

PointAttributesDoNotMatch(Format)

The attributes of the point format and point do not match.

§

PointDataRecordLengthTooLarge

The point data record length is too small for the format.

Fields

§format: Format

The point format.

§len: u16

The length of the point data record.

§

PointPaddingNotAllowed

Point padding is only allowed when evlrs are present.

§

ReturnNumber

This is not a valid return number.

Fields

§return_number: u8

The return number.

§version: Option<Version>

The version that doesn’t support this return number.

§

StringTooLong

This string is too long for the target slice.

Fields

§string: String

The string.

§len: usize

The target length.

§

TooManyEvlrs(usize)

Too many extended variable length records.

§

TooManyPoints

Too many points for this version.

Fields

§n: u64

The number of points.

§version: Version

The LAS version

§

TooManyVlrs(usize)

Too many variable length records.

§

TryFromIntError(TryFromIntError)

§

UnsupportedFeature

Feature is not supported by version.

Fields

§version: Version

The LAS version.

§feature: &'static str

The feature that is not supported

§

UnsupportedFormat

The point format is not supported by version.

Fields

§version: Version

The LAS version.

§format: Format

The unsupported point format.

§

Utf8(Utf8Error)

§

WktRequired(Format)

Wkt is required for this point format.

§

VlrTooLong(usize)

The vlr data is too long.

Trait Implementations§

source§

impl Debug for Error

source§

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

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

impl Display for Error

source§

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

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

impl Error for Error

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
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<LasZipError> for Error

source§

fn from(source: LasZipError) -> Self

Converts to this type from the input type.
source§

impl From<TryFromIntError> for Error

source§

fn from(source: TryFromIntError) -> Self

Converts to this type from the input type.
source§

impl From<Utf8Error> for Error

source§

fn from(source: Utf8Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

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

source§

default 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>,

§

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>,

§

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.