LandXmlLimits

Struct LandXmlLimits 

Source
pub struct LandXmlLimits {
Show 30 fields pub max_bytes: usize, pub max_depth: usize, pub max_name_bytes: usize, pub max_attributes: usize, pub max_attribute_bytes: usize, pub max_text_bytes: usize, pub max_character_references: usize, pub max_surfaces: usize, pub max_pipe_networks: usize, pub max_pipe_structures: usize, pub max_pipes: usize, pub max_pipe_inverts: usize, pub max_pipe_flows: usize, pub max_pipe_refusals: usize, pub max_extensions: usize, pub max_points: usize, pub max_faces: usize, pub max_references: usize, pub max_alignments: usize, pub max_profiles: usize, pub max_profile_points: usize, pub max_vertical_curves: usize, pub max_cross_sections: usize, pub max_cross_section_surfaces: usize, pub max_cross_section_points: usize, pub max_roadways: usize, pub max_preserved_only_extensions: usize, pub max_capability_diagnostics: usize, pub max_work: usize, pub assumed_linear_unit: Option<String>,
}
Expand description

Hard limits applied before semantic allocations grow with untrusted input.

Fields§

§max_bytes: usize§max_depth: usize§max_name_bytes: usize§max_attributes: usize§max_attribute_bytes: usize§max_text_bytes: usize§max_character_references: usize

Maximum predefined or numeric XML character references after DTD refusal.

§max_surfaces: usize

Maximum LandXML Surface records, including non-TIN surfaces we skip.

§max_pipe_networks: usize

Maximum LandXML PipeNetwork records, including refused networks.

§max_pipe_structures: usize

Maximum pipe-network Struct records across a document.

§max_pipes: usize

Maximum pipe-network Pipe records across a document.

§max_pipe_inverts: usize

Maximum Invert records across a document.

§max_pipe_flows: usize

Maximum PipeFlow and StructFlow records across a document.

§max_pipe_refusals: usize

Maximum element-level semantic refusals retained for a document.

§max_extensions: usize

Maximum preserved roots from foreign XML namespaces.

§max_points: usize

Maximum coordinate records across the whole source document, including Definition points, SourceData point lists and overlay vertices.

§max_faces: usize

Maximum visible face records across the whole source document.

§max_references: usize§max_alignments: usize

Maximum source alignments retained for profile and section review.

§max_profiles: usize

Maximum ProfAlign and ProfSurf records across all alignments.

§max_profile_points: usize

Maximum PVI and sampled grade-line points across all profiles.

§max_vertical_curves: usize

Maximum advertised vertical curves across all profiles.

§max_cross_sections: usize

Maximum cross-sections across all alignments.

§max_cross_section_surfaces: usize

Maximum cross-section surfaces and their vertices.

§max_cross_section_points: usize§max_roadways: usize

Maximum roadway association records.

§max_preserved_only_extensions: usize

Maximum bounded preserved-only corridor/stringline extension roots.

§max_capability_diagnostics: usize

Maximum capability records retained while parsing incomplete source data.

§max_work: usize§assumed_linear_unit: Option<String>

#5175: an explicit, caller-audited linear unit to assume when the source declares no LandXML/Units element at all. None by default, which keeps the LXML009 refusal in parser::finalize in force. This is never inferred from the file; it is supplied by the host and carried into the parsed document’s units record with assumed: true so nothing downstream can mistake it for a declared unit. A declared <Units> element always wins over this field; see parser.rs’s Metric/Imperial handler.

Trait Implementations§

Source§

impl Clone for LandXmlLimits

Source§

fn clone(&self) -> LandXmlLimits

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LandXmlLimits

Source§

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

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

impl Default for LandXmlLimits

Source§

fn default() -> Self

Returns the “default value” for a type. 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
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more