Struct msql_srv::RowWriter

source ·
pub struct RowWriter<'a, W: Read + Write> { /* private fields */ }
Expand description

Convenience type for sending rows of a resultset to a client.

Rows can either be written out one column at a time (using write_col and end_row), or one row at a time (using write_row).

This type may be dropped without calling write_row or finish. However, in this case, the program may panic if an I/O error occurs when sending the end-of-records marker to the client. To avoid this, call finish explicitly.

Implementations§

Write a value to the next column of the current row as a part of this resultset.

If you do not call end_row after the last row, any errors that occur when writing out the last row will be returned by finish. If you do not call finish either, any errors will cause a panic when the RowWriter is dropped.

Note that the row must conform to the column specification provided to QueryResultWriter::start. If it does not, this method will return an error indicating that an invalid value type or specification was provided.

Indicate that no more column data will be written for the current row.

Write a single row as a part of this resultset.

Note that the row must conform to the column specification provided to QueryResultWriter::start. If it does not, this method will return an error indicating that an invalid value type or specification was provided.

Indicate to the client that no more rows are coming.

End this resultset response, and indicate to the client that no more rows are coming.

End this resultset response, and indicate to the client there was an error.

Trait Implementations§

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Converts self into T using Into<T>. Read more
Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
Causes self to use its Binary implementation when Debug-formatted.
Causes self to use its Display implementation when Debug-formatted.
Causes self to use its LowerExp implementation when Debug-formatted.
Causes self to use its LowerHex implementation when Debug-formatted.
Causes self to use its Octal implementation when Debug-formatted.
Causes self to use its Pointer implementation when Debug-formatted.
Causes self to use its UpperExp implementation when Debug-formatted.
Causes self to use its UpperHex implementation when Debug-formatted.
Formats each item in a sequence. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the indexed conversion.
Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function.
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function.
Should always be Self
Consumes the current HList and returns an HList with the requested shape. Read more
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds.
Calls .tap_borrow() only in debug builds, and is erased in release builds.
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Calls .tap_ref() only in debug builds, and is erased in release builds.
Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Calls .tap_deref() only in debug builds, and is erased in release builds.
Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Attempts to convert self into T using TryInto<T>. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.