Skip to main content

Program

Enum Program 

Source
pub enum Program {
    SqlPostgres(Box<SqlProgram>),
    SqlDuckDB(Box<SqlProgram>),
    BytecodeLt(Program),
}

Variants§

§

SqlPostgres(Box<SqlProgram>)

§

SqlDuckDB(Box<SqlProgram>)

§

BytecodeLt(Program)

Implementations§

Source§

impl Program

Source

pub fn is_sql_postgres(&self) -> bool

Returns true if this is a Program::SqlPostgres, otherwise false

Source

pub fn as_sql_postgres_mut(&mut self) -> Option<&mut Box<SqlProgram>>

Optionally returns mutable references to the inner fields if this is a Program::SqlPostgres, otherwise None

Source

pub fn as_sql_postgres(&self) -> Option<&Box<SqlProgram>>

Optionally returns references to the inner fields if this is a Program::SqlPostgres, otherwise None

Source

pub fn into_sql_postgres(self) -> Result<Box<SqlProgram>, Self>

Returns the inner fields if this is a Program::SqlPostgres, otherwise returns back the enum in the Err case of the result

Source

pub fn is_sql_duck_db(&self) -> bool

Returns true if this is a Program::SqlDuckDB, otherwise false

Source

pub fn as_sql_duck_db_mut(&mut self) -> Option<&mut Box<SqlProgram>>

Optionally returns mutable references to the inner fields if this is a Program::SqlDuckDB, otherwise None

Source

pub fn as_sql_duck_db(&self) -> Option<&Box<SqlProgram>>

Optionally returns references to the inner fields if this is a Program::SqlDuckDB, otherwise None

Source

pub fn into_sql_duck_db(self) -> Result<Box<SqlProgram>, Self>

Returns the inner fields if this is a Program::SqlDuckDB, otherwise returns back the enum in the Err case of the result

Source

pub fn is_bytecode_lt(&self) -> bool

Returns true if this is a Program::BytecodeLt, otherwise false

Source

pub fn as_bytecode_lt_mut(&mut self) -> Option<&mut Program>

Optionally returns mutable references to the inner fields if this is a Program::BytecodeLt, otherwise None

Source

pub fn as_bytecode_lt(&self) -> Option<&Program>

Optionally returns references to the inner fields if this is a Program::BytecodeLt, otherwise None

Source

pub fn into_bytecode_lt(self) -> Result<Program, Self>

Returns the inner fields if this is a Program::BytecodeLt, otherwise returns back the enum in the Err case of the result

Trait Implementations§

Source§

impl Clone for Program

Source§

fn clone(&self) -> Program

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Program

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Decode for Program

Source§

fn decode(buf: &[u8]) -> Result<Self>

Source§

impl Encode for Program

Source§

type HeadPtr = ProgramHeadPtr

Source§

fn encode_head(&self, w: &mut BytesMut) -> ProgramHeadPtr

Source§

fn encode_body(&self, head: ProgramHeadPtr, w: &mut BytesMut)

Source§

fn encode(&self) -> Vec<u8>

Source§

impl<I: Encode, O: Decode> From<Program> for TypedProgram<I, O>

Source§

fn from(inner: Program) -> Self

Converts to this type from the input type.
Source§

impl Layout for Program

Source§

fn head_size() -> usize

Returns the size of the head in bits for a given type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.