Skip to main content

Writer

Trait Writer 

Source
pub trait Writer: Send + Sync {
    // Required method
    fn write(&mut self, to: &Path, data: Record) -> Result<Path, Error>;
}
Expand description

Write records to paths.

This is the semantic write interface. Paths are validated Unicode identifiers, and the data can be either raw bytes or parsed values.

See Reader for discussion of the &mut self requirement.

§Object Safety

This trait is object-safe: you can use Box<dyn Writer>.

Required Methods§

Source

fn write(&mut self, to: &Path, data: Record) -> Result<Path, Error>

Write a record to a path.

Returns the path where data was written. This may differ from the input path—for example, the HTTP broker returns a handle path like /outstanding/0 after queuing a request to the root path.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> Writer for &mut T
where T: Writer + ?Sized,

Source§

fn write(&mut self, to: &Path, data: Record) -> Result<Path, Error>

Source§

impl<T> Writer for Box<T>
where T: Writer + ?Sized,

Source§

fn write(&mut self, to: &Path, data: Record) -> Result<Path, Error>

Implementors§

Source§

impl Writer for MemoryStore

Source§

impl Writer for OverlayStore

Source§

impl<A, B> Writer for Cascade<A, B>
where A: Writer, B: Send + Sync,

Source§

impl<F> Writer for MountStore<F>
where F: StoreFactory,

Source§

impl<R> Writer for OnlyReadable<R>
where R: Reader + Send + Sync,

Source§

impl<S> Writer for Masked<S>
where S: Writer,

Source§

impl<S> Writer for ReadOnly<S>
where S: Reader,

Source§

impl<S> Writer for Rooted<S>
where S: Writer,

Source§

impl<S> Writer for Shared<S>
where S: Writer,

Source§

impl<S> Writer for SubStoreView<S>
where S: Writer,

Source§

impl<T, C> Writer for LLToCore<T, C>
where T: LLWriter, C: Codec + Send + Sync,

Source§

impl<W> Writer for OnlyWritable<W>
where W: Writer,