Struct librsnek::system::primitives::Signature [] [src]

pub struct Signature {
    args: Box<[String]>,
    required_kwargs: Box<[String]>,
    vargs: Option<String>,
    default_kwargs: HashMap<String, RtObject>,
    kwargs: Option<String>,
}

Represents the canonical python function signature of

Fields

Good ol' "business in the front" positional named arguments

def(*, named,...) required keyword only arguments

vargs = "*name"

name="value"

and the "party in the back" **kwargs arguments.

Methods

impl Signature
[src]

By default, creating a sigunature

Return the variable Some(name) for *kwargs if present, otherwise None

Return the variable Some(name) for **kwargs if present, otherwise None

Return the minimum number of arguments allowed by this Signature.

Return the maximum number of arguments allowed by the Signature as

Trait Implementations

impl Clone for Signature
[src]

Returns a copy of the value.

Performs copy-assignment from source.

impl Debug for Signature
[src]

Formats the value using the given formatter.

impl Eq for Signature
[src]

impl PartialEq for Signature
[src]

This method tests for self and other values to be equal, and is used

This method tests for !=.

impl Default for Signature
[src]

Create an empty signature