pub struct FunctionOwnedView(/* private fields */);Expand description
Self-contained, 'static owned view of a Function message.
Wraps ::buffa::OwnedView<FunctionView<'static>>: the decoded view and the ::buffa::bytes::Bytes buffer it borrows from travel together, so the handle is 'static and Send + Sync — suitable for async handlers, spawned tasks, and anywhere a 'static bound is required.
Field accessors return borrows tied to &self. Use Self::view to get the full FunctionView when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.
Implementations§
Source§impl FunctionOwnedView
impl FunctionOwnedView
Sourcepub fn decode(bytes: Bytes) -> Result<Self, DecodeError>
pub fn decode(bytes: Bytes) -> Result<Self, DecodeError>
Decode an owned view from a ::buffa::bytes::Bytes buffer.
The view borrows directly from the buffer’s data; the buffer is retained inside the returned handle.
§Errors
Returns ::buffa::DecodeError if the buffer contains invalid
protobuf data.
Sourcepub fn decode_with_options(
bytes: Bytes,
opts: &DecodeOptions,
) -> Result<Self, DecodeError>
pub fn decode_with_options( bytes: Bytes, opts: &DecodeOptions, ) -> Result<Self, DecodeError>
Decode with custom ::buffa::DecodeOptions (recursion limit,
max message size).
§Errors
Returns ::buffa::DecodeError if the buffer is invalid or
exceeds the configured limits.
Sourcepub fn from_owned(msg: &Function) -> Result<Self, DecodeError>
pub fn from_owned(msg: &Function) -> Result<Self, DecodeError>
Build from an owned message via an encode → decode round-trip.
§Errors
Returns ::buffa::DecodeError if the re-encoded bytes are
somehow invalid (should not happen for well-formed messages).
Sourcepub fn view(&self) -> &FunctionView<'_>
pub fn view(&self) -> &FunctionView<'_>
Borrow the full FunctionView with its lifetime tied to &self.
Sourcepub fn to_owned_message(&self) -> Function
pub fn to_owned_message(&self) -> Function
Convert to the owned message type.
Sourcepub fn into_bytes(self) -> Bytes
pub fn into_bytes(self) -> Bytes
Consume the handle, returning the underlying bytes buffer.
Sourcepub fn catalog_name(&self) -> &str
pub fn catalog_name(&self) -> &str
Name of parent catalog.
Field 2: catalog_name
Sourcepub fn schema_name(&self) -> &str
pub fn schema_name(&self) -> &str
Name of parent schema.
Field 3: schema_name
Sourcepub fn full_name(&self) -> &str
pub fn full_name(&self) -> &str
The three-level (fully qualified) name of the function.
Format: catalog_name.schema_name.function_name
Field 4: full_name
Sourcepub fn data_type(&self) -> &str
pub fn data_type(&self) -> &str
Full data type specification of the return type of the function.
Field 5: data_type
Sourcepub fn full_data_type(&self) -> &str
pub fn full_data_type(&self) -> &str
Full data type specification as SQL/catalogString text.
Field 6: full_data_type
Sourcepub fn input_params(&self) -> &MessageFieldView<FunctionParameterInfosView<'_>>
pub fn input_params(&self) -> &MessageFieldView<FunctionParameterInfosView<'_>>
The array of function parameter infos.
Field 7: input_params
Sourcepub fn return_params(&self) -> Option<&str>
pub fn return_params(&self) -> Option<&str>
The return type of the function in JSON format.
Field 8: return_params
Sourcepub fn routine_body_language(&self) -> Option<&str>
pub fn routine_body_language(&self) -> Option<&str>
The language of the function routine body.
Field 9: routine_body_language
Sourcepub fn routine_definition(&self) -> Option<&str>
pub fn routine_definition(&self) -> Option<&str>
Function body.
Field 10: routine_definition
Sourcepub fn routine_dependencies(&self) -> Option<&str>
pub fn routine_dependencies(&self) -> Option<&str>
Function dependencies (in JSON form).
Field 11: routine_dependencies
Sourcepub fn parameter_style(&self) -> EnumValue<ParameterStyle>
pub fn parameter_style(&self) -> EnumValue<ParameterStyle>
The parameter-passing style.
Field 12: parameter_style
Sourcepub fn is_deterministic(&self) -> bool
pub fn is_deterministic(&self) -> bool
Indicates whether the function is deterministic.
Field 13: is_deterministic
Sourcepub fn sql_data_access(&self) -> EnumValue<SqlDataAccess>
pub fn sql_data_access(&self) -> EnumValue<SqlDataAccess>
SQL data access information.
Field 14: sql_data_access
Sourcepub fn is_null_call(&self) -> bool
pub fn is_null_call(&self) -> bool
Indicates whether the function is null-calling.
Field 15: is_null_call
Sourcepub fn security_type(&self) -> EnumValue<SecurityType>
pub fn security_type(&self) -> EnumValue<SecurityType>
The security type of the function.
Field 16: security_type
Sourcepub fn specific_name(&self) -> Option<&str>
pub fn specific_name(&self) -> Option<&str>
The type of the function (SCALAR or TABLE).
Field 17: specific_name
Sourcepub fn routine_body(&self) -> EnumValue<RoutineBody>
pub fn routine_body(&self) -> EnumValue<RoutineBody>
The routine body.
Field 18: routine_body
Sourcepub fn comment(&self) -> Option<&str>
pub fn comment(&self) -> Option<&str>
User-provided free-form text description.
Field 19: comment
Sourcepub fn properties(&self) -> &MapView<'_, &str, &str>
pub fn properties(&self) -> &MapView<'_, &str, &str>
A map of key-value properties attached to the securable.
Field 20: properties (map)
Sourcepub fn function_id(&self) -> Option<&str>
pub fn function_id(&self) -> Option<&str>
Unique identifier for the function.
Field 22: function_id
Sourcepub fn created_at(&self) -> Option<i64>
pub fn created_at(&self) -> Option<i64>
Time at which this function was created, in epoch milliseconds.
Field 1000: created_at
Sourcepub fn created_by(&self) -> Option<&str>
pub fn created_by(&self) -> Option<&str>
Username of function creator.
Field 1001: created_by
Sourcepub fn updated_at(&self) -> Option<i64>
pub fn updated_at(&self) -> Option<i64>
Time at which this function was last updated, in epoch milliseconds.
Field 1002: updated_at
Sourcepub fn updated_by(&self) -> Option<&str>
pub fn updated_by(&self) -> Option<&str>
Username of user who last modified the function.
Field 1003: updated_by
Trait Implementations§
Source§impl AsRef<OwnedView<FunctionView<'static>>> for FunctionOwnedView
impl AsRef<OwnedView<FunctionView<'static>>> for FunctionOwnedView
Source§fn as_ref(&self) -> &OwnedView<FunctionView<'static>>
fn as_ref(&self) -> &OwnedView<FunctionView<'static>>
Source§impl Clone for FunctionOwnedView
impl Clone for FunctionOwnedView
Source§fn clone(&self) -> FunctionOwnedView
fn clone(&self) -> FunctionOwnedView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more