pub struct WorldBox {
pub min: [i64; 3],
pub extent: [NonZeroU32; 3],
}Expand description
A box of world cells: its low corner and its extent, in blocks.
The cells are min[i] ..= min[i] + extent[i] - 1 on each axis. The extent is
NonZeroU32 rather than a u32 a check refuses: a zero-extent region is
not a small region, it is a document that does not describe a volume, and the
schema says so (minimum: 1) so the parse refuses it as an ordinary
DW0100. One fewer diagnostic to write and one fewer to forget.
Fields§
§min: [i64; 3]Low corner [x, y, z], in world coordinates.
extent: [NonZeroU32; 3]Extent [dx, dy, dz], in blocks.
Implementations§
Trait Implementations§
impl Copy for WorldBox
Source§impl<'de> Deserialize<'de> for WorldBox
impl<'de> Deserialize<'de> for WorldBox
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for WorldBox
Source§impl JsonSchema for WorldBox
impl JsonSchema for WorldBox
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for WorldBox
Auto Trait Implementations§
impl Freeze for WorldBox
impl RefUnwindSafe for WorldBox
impl Send for WorldBox
impl Sync for WorldBox
impl Unpin for WorldBox
impl UnsafeUnpin for WorldBox
impl UnwindSafe for WorldBox
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more