#[repr(C)]pub struct PdStatement {
pub version: i32,
pub len: u64,
pub data: *mut c_void,
}
Expand description
Wrapper around output by pg_query.
Fields§
§version: i32
Parser version.
len: u64
Size of the statement pointer.
data: *mut c_void
The statement pointer.
Implementations§
Source§impl PdStatement
impl PdStatement
Sourcepub unsafe fn from_proto(value: &ParseResult) -> Self
pub unsafe fn from_proto(value: &ParseResult) -> Self
Create FFI binding from pg_query
output.
§Safety
The reference must live for the entire time this struct is used. This is not checked by the compiler, and is the responsibility of the caller.
Source§impl PdStatement
impl PdStatement
Sourcepub fn protobuf(&self) -> PdParseResult
pub fn protobuf(&self) -> PdParseResult
Get the protobuf-wrapped PostgreSQL statement. The returned structure, PdParseResult
,
implements Deref
to pg_query::protobuf::ParseResult
and can be used to parse the
statement.
Trait Implementations§
Source§impl Clone for PdStatement
impl Clone for PdStatement
Source§fn clone(&self) -> PdStatement
fn clone(&self) -> PdStatement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PdStatement
impl Debug for PdStatement
Source§impl From<PdStatement> for PdParseResult
impl From<PdStatement> for PdParseResult
Source§fn from(value: PdStatement) -> Self
fn from(value: PdStatement) -> Self
Create the binding from a FFI-passed reference.
SAFETY: Memory is owned by the caller.
impl Copy for PdStatement
Auto Trait Implementations§
impl Freeze for PdStatement
impl RefUnwindSafe for PdStatement
impl !Send for PdStatement
impl !Sync for PdStatement
impl Unpin for PdStatement
impl UnwindSafe for PdStatement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more