pub fn append<T: ToAvro>(&mut self, value: T) -> Result<usize, Error> {
        let n = if !self.has_header {
            let header = self.header()?;
            let n = self.append_bytes(header.as_ref())?;
            self.has_header = true;
            n
        } else {
            0
        };

        let avro = value.avro();
        write_value_ref(self.schema, &avro, &mut self.buffer)?;

        self.num_values += 1;

        if self.buffer.len() >= SYNC_INTERVAL {
            return self.flush().map(|b| b + n);
        }

        Ok(n)
    }
/// Append a compatible value (implementing the `ToAvro` trait) to a `Writer`, also performing
/// schema validation.
///
/// Return the number of bytes written (it might be 0, see below).
///
/// **NOTE** This function is not guaranteed to perform any actual write, since it relies on
/// internal buffering for performance reasons. If you want to be sure the value has been
/// written, then call [`flush`](struct.Writer.html#method.flush).
Append a compatible value (implementing the `ToAvro` trait) to a `Writer`, also performing
schema validation.

Return the number of bytes written (it might be 0, see below).

NOTE** This function is not guaranteed to perform any actual write, since it relies on
internal buffering for performance reasons. If you want to be sure the value has been
written, then call [`flush`](struct.Writer.html#method.flush).
Append a compatible value ( implementing the ` ToAvro ` trait ) to a ` Writer ` also performing schema validation . Return the number of bytes written ( it might be 0 see below ) . NOTE ** This function is not guaranteed to perform any actual write since it relies on internal buffering for performance reasons . If you want to be sure the value has been written then call [ ` flush ` ] ( struct . Writer . html#method . flush ) .
pub fn append<T: ToAvro>(&mut self, value: T) -> Result<usize, Error> {
        let n = if !self.has_header {
            let header = self.header()?;
            let n = self.append_bytes(header.as_ref())?;
            self.has_header = true;
            n
        } else {
            0
        };
        let avro = value.avro();
        write_value_ref(self.schema, &avro, &mut self.buffer)?;
        self.num_values += 1;
        if self.buffer.len() >= SYNC_INTERVAL {
            return self.flush().map(|b| b + n);
        }
        Ok(n)
    }
pub fn append < T : ToAvro > ( & mut self , value : T ) -> Result < usize , Error > { let n = if ! self . has_header { let header = self . header ( ) ? ; let n = self . append_bytes ( header . as_ref ( ) ) ? ; self . has_header = true ; n } else { 0 } ; let avro = value . avro ( ) ; write_value_ref ( self . schema , & avro , & mut self . buffer ) ? ; self . num_values += 1 ; if self . buffer . len ( ) >= SYNC_INTERVAL { return self . flush ( ) . map ( | b | b + n ) ; } Ok ( n ) }
Append a compatible value (implementing the `ToAvro` trait) to a `Writer`, also performing
schema validation.
Append a compatible value ( implementing the ` ToAvro ` trait ) to a ` Writer ` also performing schema validation .
&mut self
value
T