Arguments

Struct Arguments 

Source
pub struct Arguments<'args> { /* private fields */ }
Expand description

过程调用参数列表对象的引用,此对象可以添加参数

§Examples

ci.args.add_long(123);
ci.args.add_long(None); //添加NULL值

Implementations§

Source§

impl<'args> Arguments<'args>

Source

pub fn as_ref(&self) -> ArgumentsRef<'_>

获取引用对象

Source

pub fn iter(&self) -> ArgumentsIter<'_>

获取引用元素迭代器

Source

pub fn count(&self) -> pbint

参数数量

Source

pub fn get(&self, index: pbint) -> Value<'args>

获取参数值

§Panics

索引越界时会触发Panic

Source

pub fn try_get(&self, index: pbint) -> Result<Value<'args>>

尝试获取参数值

Source

pub fn add_int(&mut self, value: impl Into<Option<pbint>>) -> Result<()>

添加int类型参数

Source

pub fn add_uint(&mut self, value: impl Into<Option<pbuint>>) -> Result<()>

添加uint类型参数

Source

pub fn add_long(&mut self, value: impl Into<Option<pblong>>) -> Result<()>

添加long类型参数

Source

pub fn add_ulong(&mut self, value: impl Into<Option<pbulong>>) -> Result<()>

添加ulong类型参数

Source

pub fn add_longlong( &mut self, value: impl Into<Option<pblonglong>>, ) -> Result<()>

添加longlong类型参数

Source

pub fn add_real(&mut self, value: impl Into<Option<pbreal>>) -> Result<()>

添加real类型参数

Source

pub fn add_double(&mut self, value: impl Into<Option<pbdouble>>) -> Result<()>

添加double类型参数

Source

pub fn add_dec(&mut self, value: impl Into<Option<Decimal>>) -> Result<()>

添加decimal类型参数

Source

pub fn add_string<T, D>(&mut self, value: T) -> Result<()>
where T: Into<Option<D>>, D: AsPBStr,

添加string类型参数

Source

pub fn add_bool(&mut self, value: impl Into<Option<bool>>) -> Result<()>

添加boolean类型参数

Source

pub fn add_blob<'a>(&mut self, value: impl Into<Option<&'a [u8]>>) -> Result<()>

添加blob类型参数

Source

pub fn add_date(&mut self, value: impl Into<Option<NaiveDate>>) -> Result<()>

添加date类型参数

Source

pub fn add_time(&mut self, value: impl Into<Option<NaiveTime>>) -> Result<()>

添加time类型参数

Source

pub fn add_datetime( &mut self, value: impl Into<Option<NaiveDateTime>>, ) -> Result<()>

添加datetime类型参数

Source

pub fn add_char(&mut self, value: impl Into<Option<WideChar>>) -> Result<()>

添加char类型参数

Source

pub fn add_object<'a, 'b: 'a>( &mut self, value: impl Into<Option<&'a Object<'b>>>, ) -> Result<()>

添加对象类型参数

Source

pub fn add_array<'a, 'b: 'a>( &mut self, value: impl Into<Option<&'a Array<'b>>>, ) -> Result<()>

添加数组类型参数

Trait Implementations§

Source§

impl<'args> IntoIterator for Arguments<'args>

Source§

type Item = Value<'args>

The type of the elements being iterated over.
Source§

type IntoIter = ArgumentsIter<'args>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<'args> Freeze for Arguments<'args>

§

impl<'args> RefUnwindSafe for Arguments<'args>

§

impl<'args> !Send for Arguments<'args>

§

impl<'args> !Sync for Arguments<'args>

§

impl<'args> Unpin for Arguments<'args>

§

impl<'args> UnwindSafe for Arguments<'args>

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> 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, 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.