pub struct TarTileSink<W: Write + Send> { /* private fields */ }Expand description
Re‑exports the container registry and common open/write helpers.
A tile sink that writes pre-compressed blobs into a .tar archive.
Constructed with a fixed TileFormat and TileCompression. Every blob
passed to write_tile must already be encoded
and compressed accordingly.
§Thread Safety
Uses a std::sync::Mutex around the inner tar::Builder so that
multiple threads can call write_tile concurrently (e.g. from
spawn_blocking tasks).
Implementations§
Source§impl TarTileSink<BufWriter<File>>
impl TarTileSink<BufWriter<File>>
Sourcepub fn new(
path: &Path,
tile_format: TileFormat,
tile_compression: TileCompression,
) -> Result<Self>
pub fn new( path: &Path, tile_format: TileFormat, tile_compression: TileCompression, ) -> Result<Self>
Create a new TarTileSink that writes to a local file at path.
Sourcepub fn open(
destination: &str,
tile_format: TileFormat,
tile_compression: TileCompression,
runtime: &TilesRuntime,
) -> Result<Box<dyn TileSink>>
pub fn open( destination: &str, tile_format: TileFormat, tile_compression: TileCompression, runtime: &TilesRuntime, ) -> Result<Box<dyn TileSink>>
Open a tar tile sink from a destination string (local path or sftp:// URL).
Source§impl<W: Write + Send> TarTileSink<W>
impl<W: Write + Send> TarTileSink<W>
Sourcepub fn from_writer(
writer: W,
tile_format: TileFormat,
tile_compression: TileCompression,
) -> Self
pub fn from_writer( writer: W, tile_format: TileFormat, tile_compression: TileCompression, ) -> Self
Create a new TarTileSink from any Write implementor.
Trait Implementations§
Auto Trait Implementations§
impl<W> !Freeze for TarTileSink<W>
impl<W> RefUnwindSafe for TarTileSink<W>
impl<W> Send for TarTileSink<W>
impl<W> Sync for TarTileSink<W>
impl<W> Unpin for TarTileSink<W>
impl<W> UnsafeUnpin for TarTileSink<W>
impl<W> UnwindSafe for TarTileSink<W>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.