pub struct FunctionParameter { /* private fields */ }Expand description
Function parameter definition
Represents a parameter in a function signature with optional name, type, and mode.
§Examples
use reinhardt_query::types::function::{FunctionParameter, ParameterMode};
// IN parameter with name
let param = FunctionParameter::new()
.name("my_param")
.param_type("integer")
.mode(ParameterMode::In);
// OUT parameter without name
let param = FunctionParameter::new()
.param_type("text")
.mode(ParameterMode::Out);Implementations§
Source§impl FunctionParameter
impl FunctionParameter
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new function parameter
§Examples
use reinhardt_query::types::function::FunctionParameter;
let param = FunctionParameter::new();Sourcepub fn name<N: IntoIden>(self, name: N) -> Self
pub fn name<N: IntoIden>(self, name: N) -> Self
Set parameter name
§Examples
use reinhardt_query::types::function::FunctionParameter;
let param = FunctionParameter::new()
.name("my_param");Sourcepub fn param_type<T: Into<String>>(self, param_type: T) -> Self
pub fn param_type<T: Into<String>>(self, param_type: T) -> Self
Set parameter type
§Examples
use reinhardt_query::types::function::FunctionParameter;
let param = FunctionParameter::new()
.param_type("integer");Sourcepub fn mode(self, mode: ParameterMode) -> Self
pub fn mode(self, mode: ParameterMode) -> Self
Set parameter mode
§Examples
use reinhardt_query::types::function::{FunctionParameter, ParameterMode};
let param = FunctionParameter::new()
.mode(ParameterMode::InOut);Sourcepub fn default_value<V: Into<String>>(self, value: V) -> Self
pub fn default_value<V: Into<String>>(self, value: V) -> Self
Set parameter default value
§Examples
use reinhardt_query::types::function::FunctionParameter;
let param = FunctionParameter::new()
.default_value("42");Trait Implementations§
Source§impl Clone for FunctionParameter
impl Clone for FunctionParameter
Source§fn clone(&self) -> FunctionParameter
fn clone(&self) -> FunctionParameter
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 FunctionParameter
impl Debug for FunctionParameter
Auto Trait Implementations§
impl Freeze for FunctionParameter
impl !RefUnwindSafe for FunctionParameter
impl !Send for FunctionParameter
impl !Sync for FunctionParameter
impl Unpin for FunctionParameter
impl UnsafeUnpin for FunctionParameter
impl !UnwindSafe for FunctionParameter
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