pub struct Capture { /* private fields */ }Expand description
A capture read from a .dzgeo file.
Implementations§
Source§impl Capture
impl Capture
Sourcepub fn read(r: &mut impl Read) -> Result<Self>
pub fn read(r: &mut impl Read) -> Result<Self>
Reads a capture. A capture cut short keeps every complete tile; a partial trailing block is
ignored. A tile captured twice keeps the later copy; tiles are sorted by (z, x).
Every record is parsed, so one malformed record fails the whole read. CaptureFile parses a
record only when its tile is asked for, and so fails only that tile (the tile of a run is
reported as failed, the others are built).
§Errors
“not a capture file” (bad magic), “unsupported capture version N”, “capture truncated” (cut
before the world block is complete), “invalid capture block size N” (above 1 GiB), and the
errors of WorldParams::parse and TileInput::parse for a complete but malformed block.
Sourcepub fn params(&self) -> &WorldParams
pub fn params(&self) -> &WorldParams
The world params.
Trait Implementations§
impl StructuralPartialEq for Capture
Auto Trait Implementations§
impl Freeze for Capture
impl RefUnwindSafe for Capture
impl Send for Capture
impl Sync for Capture
impl Unpin for Capture
impl UnsafeUnpin for Capture
impl UnwindSafe for Capture
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().