pub struct FunctionOptions { /* private fields */ }Expand description
Name, arity, and SQLite properties for a function registration.
Options default to UTF-8 and do not claim that a callback is deterministic, innocuous, or direct-only. These properties must reflect the callback’s actual behavior, so authors opt into them explicitly.
Implementations§
Source§impl FunctionOptions
impl FunctionOptions
Sourcepub fn new(name: impl Into<String>, arity: Arity) -> Self
pub fn new(name: impl Into<String>, arity: Arity) -> Self
Create schema-accessible UTF-8 function options.
Sourcepub fn deterministic(self) -> Self
pub fn deterministic(self) -> Self
Declare that equal inputs always produce equal outputs.
Sourcepub fn innocuous(self) -> Self
pub fn innocuous(self) -> Self
Declare that the function has no harmful side effects or data leaks.
Sourcepub fn direct_only(self) -> Self
pub fn direct_only(self) -> Self
Restrict the function to top-level SQL.
Sourcepub fn with_flags(self, flags: FunctionFlags) -> Self
pub fn with_flags(self, flags: FunctionFlags) -> Self
Add advanced rusqlite function flags.
Sourcepub const fn flags(&self) -> FunctionFlags
pub const fn flags(&self) -> FunctionFlags
Effective SQLite function flags.
Trait Implementations§
Source§impl Clone for FunctionOptions
impl Clone for FunctionOptions
Source§fn clone(&self) -> FunctionOptions
fn clone(&self) -> FunctionOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FunctionOptions
impl RefUnwindSafe for FunctionOptions
impl Send for FunctionOptions
impl Sync for FunctionOptions
impl Unpin for FunctionOptions
impl UnsafeUnpin for FunctionOptions
impl UnwindSafe for FunctionOptions
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