Struct tfrecord::EventWriterInit[][src]

pub struct EventWriterInit {
    pub auto_flush: bool,
}

The event writer initializer.

Fields

auto_flush: bool

If set, the writer flushes the buffer after writing a event.

Implementations

impl EventWriterInit[src]

pub fn from_writer<W>(self, writer: W) -> Result<EventWriter<W>, Error> where
    W: Write
[src]

Construct an EventWriter from a type with Write trait.

pub fn create<P>(self, path: P) -> Result<EventWriter<BufWriter<File>>, Error> where
    P: AsRef<Path>, 
[src]

Construct an EventWriter by creating a file at specified path.

pub fn from_prefix<S1>(
    self,
    prefix: S1,
    file_name_suffix: Option<String>
) -> Result<EventWriter<BufWriter<File>>, Error> where
    S1: AsRef<str>, 
[src]

Construct an EventWriter with TensorFlow-style path prefix and an optional file name suffix.

pub fn from_async_writer<W>(self, writer: W) -> Result<EventWriter<W>, Error> where
    W: AsyncWriteExt, 
[src]

Construct an EventWriter from a type with [AsyncWriteExt] trait.

pub async fn create_async<P>(
    self,
    path: P
) -> Result<EventWriter<BufWriter<File>>, Error> where
    P: AsRef<Path>, 
[src]

Construct an EventWriter by creating a file at specified path.

pub async fn from_prefix_async<S1>(
    self,
    prefix: S1,
    file_name_suffix: Option<String>
) -> Result<EventWriter<BufWriter<File>>, Error> where
    S1: AsRef<str>, 
[src]

Construct an asynchronous EventWriter with TensorFlow-style path prefix and an optional file name suffix.

Trait Implementations

impl Clone for EventWriterInit[src]

impl Debug for EventWriterInit[src]

impl Default for EventWriterInit[src]

impl Eq for EventWriterInit[src]

impl Hash for EventWriterInit[src]

impl PartialEq<EventWriterInit> for EventWriterInit[src]

impl StructuralEq for EventWriterInit[src]

impl StructuralPartialEq for EventWriterInit[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,