pub struct Documentation {
pub doc_section: DocSection,
pub description: String,
pub syntax_example: String,
pub sql_example: Option<String>,
pub arguments: Option<Vec<(String, String)>>,
pub alternative_syntax: Option<Vec<String>>,
pub related_udfs: Option<Vec<String>>,
}Expand description
Documentation for use by ScalarUDFImpl,
AggregateUDFImpl and WindowUDFImpl functions
that will be used to generate public documentation.
The name of the udf will be pulled from the ScalarUDFImpl::name,
AggregateUDFImpl::name or WindowUDFImpl::name
function as appropriate.
All strings in the documentation are required to be in markdown format.
Currently, documentation only supports a single language thus all text should be in English.
Fields§
§doc_section: DocSectionThe section in the documentation where the UDF will be documented
description: StringThe description for the UDF
syntax_example: StringA brief example of the syntax. For example “ascii(str)”
sql_example: Option<String>A sql example for the UDF, usually in the form of a sql prompt query and output. It is strongly recommended to provide an example for anything but the most basic UDF’s
arguments: Option<Vec<(String, String)>>Arguments for the UDF which will be displayed in array order. Left member of a pair is the argument name, right is a description for the argument
alternative_syntax: Option<Vec<String>>A list of alternative syntax examples for a function
Related functions if any. Values should match the related udf’s name exactly. Related udf’s must be of the same UDF type (scalar, aggregate or window) for proper linking to occur
Implementations§
Source§impl Documentation
impl Documentation
Sourcepub fn builder() -> DocumentationBuilder
pub fn builder() -> DocumentationBuilder
Returns a new DocumentationBuilder with no options set.
Trait Implementations§
Source§impl Clone for Documentation
impl Clone for Documentation
Source§fn clone(&self) -> Documentation
fn clone(&self) -> Documentation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Documentation
impl RefUnwindSafe for Documentation
impl Send for Documentation
impl Sync for Documentation
impl Unpin for Documentation
impl UnwindSafe for Documentation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more