[−][src]Trait rustpython_vm::function::FromArgs
Implemented by any type that can be accepted as a parameter to a built-in function.
Required methods
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
Extracts this item from the next argument(s).
Provided methods
fn arity() -> RangeInclusive<usize>
The range of positional arguments permitted by the function signature.
Returns an empty range if not applicable.
Implementations on Foreign Types
impl FromArgs for ()
[src]
fn from_args(
_vm: &VirtualMachine,
_args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
_vm: &VirtualMachine,
_args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl<A> FromArgs for (A,) where
A: FromArgs,
[src]
A: FromArgs,
fn arity() -> RangeInclusive<usize>
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl<A, B> FromArgs for (A, B) where
A: FromArgs,
B: FromArgs,
[src]
A: FromArgs,
B: FromArgs,
fn arity() -> RangeInclusive<usize>
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl<A, B, C> FromArgs for (A, B, C) where
A: FromArgs,
B: FromArgs,
C: FromArgs,
[src]
A: FromArgs,
B: FromArgs,
C: FromArgs,
fn arity() -> RangeInclusive<usize>
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl<A, B, C, D> FromArgs for (A, B, C, D) where
A: FromArgs,
B: FromArgs,
C: FromArgs,
D: FromArgs,
[src]
A: FromArgs,
B: FromArgs,
C: FromArgs,
D: FromArgs,
fn arity() -> RangeInclusive<usize>
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl<A, B, C, D, E> FromArgs for (A, B, C, D, E) where
A: FromArgs,
B: FromArgs,
C: FromArgs,
D: FromArgs,
E: FromArgs,
[src]
A: FromArgs,
B: FromArgs,
C: FromArgs,
D: FromArgs,
E: FromArgs,
fn arity() -> RangeInclusive<usize>
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl<A, B, C, D, E, F> FromArgs for (A, B, C, D, E, F) where
A: FromArgs,
B: FromArgs,
C: FromArgs,
D: FromArgs,
E: FromArgs,
F: FromArgs,
[src]
A: FromArgs,
B: FromArgs,
C: FromArgs,
D: FromArgs,
E: FromArgs,
F: FromArgs,
fn arity() -> RangeInclusive<usize>
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
Implementors
impl FromArgs for PyFuncArgs
[src]
fn from_args(
_vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
_vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl FromArgs for ByteInnerExpandtabsOptions
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl FromArgs for ByteInnerFindOptions
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl FromArgs for ByteInnerNewOptions
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl FromArgs for ByteInnerPaddingOptions
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl FromArgs for ByteInnerSplitOptions
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl FromArgs for ByteInnerSplitlinesOptions
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl FromArgs for ByteInnerTranslateOptions
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl<T> FromArgs for OptionalArg<T> where
T: TryFromObject,
[src]
T: TryFromObject,
fn arity() -> RangeInclusive<usize>
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl<T> FromArgs for Args<T> where
T: TryFromObject,
[src]
T: TryFromObject,
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl<T> FromArgs for KwArgs<T> where
T: TryFromObject,
[src]
T: TryFromObject,
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
impl<T> FromArgs for T where
T: TryFromObject,
[src]
T: TryFromObject,
fn arity() -> RangeInclusive<usize>
[src]
fn from_args(
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>
[src]
vm: &VirtualMachine,
args: &mut PyFuncArgs
) -> Result<Self, ArgumentError>