Crate callable

Source
Expand description
let callable = callable![fn(&_) -> _](u8::clone);
assert_eq!(callable.call_fn((&1,)), 1);
assert_eq!(callable.emit(&2), 2);

let callable = callable.provide_first_argument_refed(3);
assert_eq!(callable.call_fn(()), 3);

Re-exports§

pub use argument::ArgumentOfType;
pub use argument::ArgumentType;
pub use argument::ArgumentTypes;
pub use argument::ArgumentsOfTypes;

Modules§

accept_anything
argument
chain
mut
prelude
ref
value

Macros§

ArgumentType
ArgumentTypes
__callable_parse_input
callable

Enums§

NeverCalled

Traits§

Callable
Anything implementing CallableOne has the following traits:
CallableOne
A trait alias for Callable with exactly one argument.
CallableWithFixedArguments
A Callable which has no overloading.
IsCallable
MaybeHandleEvent
StatedEvent
Tuple
This trait is sealed and only implemented for tuples (with max 4 elements).

Functions§

FnPointer
callable
mut
ref
value

Type Aliases§

FnPointer