pub struct PosArgs<T = PyObjectRef>(/* private fields */);
Expand description
A list of positional argument values.
A built-in function with a PosArgs
parameter is analogous to a Python
function with *args
. All remaining positional arguments are extracted
(and hence the function will permit an arbitrary number of them).
PosArgs
optionally accepts a generic type parameter to allow type checks
or conversions of each argument.
Implementations§
Source§impl<T: PyPayload> PosArgs<PyRef<T>>
impl<T: PyPayload> PosArgs<PyRef<T>>
pub fn into_tuple(self, vm: &VirtualMachine) -> PyTupleRef
Trait Implementations§
Source§impl<T> FromArgs for PosArgs<T>where
T: TryFromObject,
impl<T> FromArgs for PosArgs<T>where
T: TryFromObject,
Source§fn from_args(
vm: &VirtualMachine,
args: &mut FuncArgs,
) -> Result<Self, ArgumentError>
fn from_args( vm: &VirtualMachine, args: &mut FuncArgs, ) -> Result<Self, ArgumentError>
Extracts this item from the next argument(s).
Source§impl<T> IntoIterator for PosArgs<T>
impl<T> IntoIterator for PosArgs<T>
Auto Trait Implementations§
impl<T> Freeze for PosArgs<T>
impl<T> RefUnwindSafe for PosArgs<T>where
T: RefUnwindSafe,
impl<T> Send for PosArgs<T>where
T: Send,
impl<T> Sync for PosArgs<T>where
T: Sync,
impl<T> Unpin for PosArgs<T>where
T: Unpin,
impl<T> UnwindSafe for PosArgs<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 moreSource§impl<T> IntoFuncArgs for T
impl<T> IntoFuncArgs for T
fn into_args(self, _vm: &VirtualMachine) -> FuncArgs
fn into_method_args(self, obj: PyObjectRef, vm: &VirtualMachine) -> FuncArgs
Source§impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
fn overflowing_into(self) -> (U, bool)
Source§impl<T, U> RoundingInto<U> for Twhere
U: RoundingFrom<T>,
impl<T, U> RoundingInto<U> for Twhere
U: RoundingFrom<T>,
fn rounding_into(self, rm: RoundingMode) -> (U, Ordering)
Source§impl<T, U> SaturatingInto<U> for Twhere
U: SaturatingFrom<T>,
impl<T, U> SaturatingInto<U> for Twhere
U: SaturatingFrom<T>,
fn saturating_into(self) -> U
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)