pub fn append_value_ref(&mut self, value: &Value) -> 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
        };

        write_value_ref(self.schema, value, &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 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 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 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_value_ref(&mut self, value: &Value) -> 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
        };
        write_value_ref(self.schema, value, &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_value_ref ( & mut self , value : & Value ) -> 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 } ; write_value_ref ( self . schema , value , & 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 to a `Writer`, also performing schema validation.
Append a compatible value to a ` Writer ` also performing schema validation .
&mut self
value
&Value