pub enum CommandItem {
Row(Row),
Metadata(ResultMetadata),
ReturnStatus(u32),
ReturnValue(CommandReturnValue),
RowsAffected(u64),
}Expand description
An item produced by a CommandStream.
Variants§
Row(Row)
A single row of data.
Metadata(ResultMetadata)
Metadata describing the upcoming rows.
ReturnStatus(u32)
The return status from the server.
ReturnValue(CommandReturnValue)
A return value, matching an OUT parameter.
RowsAffected(u64)
The number of rows affected by one of the statements ran on the server.
Implementations§
Source§impl CommandItem
impl CommandItem
Sourcepub fn as_metadata(&self) -> Option<&ResultMetadata>
pub fn as_metadata(&self) -> Option<&ResultMetadata>
Returns a reference to the metadata, if the item is of a correct variant.
Sourcepub fn as_row(&self) -> Option<&Row>
pub fn as_row(&self) -> Option<&Row>
Returns a reference to the row, if the item is of a correct variant.
Sourcepub fn into_metadata(self) -> Option<ResultMetadata>
pub fn into_metadata(self) -> Option<ResultMetadata>
Returns the metadata, if the item is of a correct variant.
Sourcepub fn as_return_status(&self) -> Option<u32>
pub fn as_return_status(&self) -> Option<u32>
Returns the return status, if the item is of a correct variant.
Sourcepub fn as_return_value(&self) -> Option<&CommandReturnValue>
pub fn as_return_value(&self) -> Option<&CommandReturnValue>
Returns a reference to the return value, if the item is of a correct variant.
Sourcepub fn into_return_value(self) -> Option<CommandReturnValue>
pub fn into_return_value(self) -> Option<CommandReturnValue>
Returns the return value, if the item is of a correct variant.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommandItem
impl RefUnwindSafe for CommandItem
impl Send for CommandItem
impl Sync for CommandItem
impl Unpin for CommandItem
impl UnsafeUnpin for CommandItem
impl UnwindSafe for CommandItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more