pub(crate) struct Function {
pub(crate) name: String,
pub(crate) args: Vec<ArgType>,
pub(crate) ret: Option<Type>,
pub(crate) fallible: bool,
}
Fields§
§name: String
§args: Vec<ArgType>
§ret: Option<Type>
§fallible: bool
Implementations§
Source§impl Function
impl Function
pub(crate) fn strategy(self) -> Vec<BoxedStrategy<Option<ArbitraryType>>>
fn process_arg(ty: &Type) -> Result<Type, String>
fn get_simple_type(ty: &str) -> Option<Type>
fn custom_templates(func: &ItemFn) -> Vec<Option<Type>>
fn parse_template_stream(ts: TokenStream) -> Vec<Type>
fn parse_template_type(token: TokenTree) -> Type
pub(crate) fn from_item(item: &ItemFn) -> Result<Self, String>
fn get_args(item: &ItemFn) -> Vec<ArgType>
fn wrap_arg(optional: bool, ty: &Type) -> Option<ArgType>
fn get_output(item: &ItemFn) -> Result<(Option<Type>, bool), String>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Function
impl<'de> Deserialize<'de> for Function
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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