2017-06-24 08:36:51 +00:00
|
|
|
// Copyright (c) 2017-present PyO3 Project and Contributors
|
2017-05-21 05:18:31 +00:00
|
|
|
use func::MethodProto;
|
|
|
|
|
|
|
|
pub struct Proto {
|
|
|
|
pub name: &'static str,
|
|
|
|
pub methods: &'static [MethodProto],
|
|
|
|
pub py_methods: &'static [PyMethod],
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct PyMethod {
|
|
|
|
pub name: &'static str,
|
|
|
|
pub proto: &'static str,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub const OBJECT: Proto = Proto {
|
|
|
|
name: "Object",
|
|
|
|
methods: &[
|
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__getattr__",
|
|
|
|
arg: "Name",
|
2017-05-23 19:57:18 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::basic::PyObjectGetAttrProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Ternary {
|
2017-05-22 05:22:45 +00:00
|
|
|
name: "__setattr__",
|
2017-05-21 05:18:31 +00:00
|
|
|
arg1: "Name",
|
|
|
|
arg2: "Value",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::basic::PyObjectSetAttrProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__delattr__",
|
|
|
|
arg: "Name",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::basic::PyObjectDelAttrProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__str__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::basic::PyObjectStrProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__repr__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::basic::PyObjectReprProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__format__",
|
|
|
|
arg: "Format",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::basic::PyObjectFormatProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__hash__",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::basic::PyObjectHashProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__bytes__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::basic::PyObjectBytesProtocol",
|
|
|
|
},
|
2017-06-15 14:48:57 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__unicode__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::basic::PyObjectUnicodeProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__bool__",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::basic::PyObjectBoolProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__richcmp__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::basic::PyObjectRichcmpProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
],
|
|
|
|
py_methods: &[
|
|
|
|
PyMethod {
|
|
|
|
name: "__format__",
|
2018-08-26 16:41:55 +00:00
|
|
|
proto: "::pyo3::class::basic::FormatProtocolImpl",
|
2017-05-21 05:18:31 +00:00
|
|
|
},
|
|
|
|
PyMethod {
|
|
|
|
name: "__bytes__",
|
2018-08-26 16:41:55 +00:00
|
|
|
proto: "::pyo3::class::basic::BytesProtocolImpl",
|
2017-05-21 05:18:31 +00:00
|
|
|
},
|
2017-06-15 14:48:57 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__unicode__",
|
2018-08-26 16:41:55 +00:00
|
|
|
proto: "::pyo3::class::basic::UnicodeProtocolImpl",
|
2017-06-15 14:48:57 +00:00
|
|
|
},
|
2018-07-03 20:28:40 +00:00
|
|
|
],
|
2017-05-21 05:18:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
pub const ASYNC: Proto = Proto {
|
|
|
|
name: "Async",
|
|
|
|
methods: &[
|
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__await__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::async::PyAsyncAwaitProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__aiter__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::async::PyAsyncAiterProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__anext__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::async::PyAsyncAnextProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__aenter__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::async::PyAsyncAenterProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Quaternary {
|
|
|
|
name: "__aexit__",
|
2018-07-03 20:28:40 +00:00
|
|
|
arg1: "ExcType",
|
|
|
|
arg2: "ExcValue",
|
|
|
|
arg3: "Traceback",
|
|
|
|
proto: "::pyo3::class::async::PyAsyncAexitProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
],
|
|
|
|
py_methods: &[
|
|
|
|
PyMethod {
|
|
|
|
name: "__aenter__",
|
2017-05-25 03:31:51 +00:00
|
|
|
proto: "::pyo3::class::async::PyAsyncAenterProtocolImpl",
|
2017-05-21 05:18:31 +00:00
|
|
|
},
|
|
|
|
PyMethod {
|
|
|
|
name: "__aexit__",
|
2017-05-25 03:31:51 +00:00
|
|
|
proto: "::pyo3::class::async::PyAsyncAexitProtocolImpl",
|
2017-05-21 05:18:31 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
2017-05-29 22:08:19 +00:00
|
|
|
pub const BUFFER: Proto = Proto {
|
|
|
|
name: "Buffer",
|
|
|
|
methods: &[
|
2018-07-03 20:28:40 +00:00
|
|
|
MethodProto::Unary {
|
2017-05-29 22:08:19 +00:00
|
|
|
name: "bf_getbuffer",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::buffer::PyBufferGetBufferProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Unary {
|
2017-05-29 22:08:19 +00:00
|
|
|
name: "bf_releasebuffer",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::buffer::PyBufferReleaseBufferProtocol",
|
|
|
|
},
|
2017-05-29 22:08:19 +00:00
|
|
|
],
|
|
|
|
py_methods: &[],
|
|
|
|
};
|
|
|
|
|
2017-05-21 05:18:31 +00:00
|
|
|
pub const CONTEXT: Proto = Proto {
|
|
|
|
name: "Context",
|
|
|
|
methods: &[
|
2018-07-03 20:28:40 +00:00
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__enter__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::context::PyContextEnterProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Quaternary {
|
|
|
|
name: "__exit__",
|
2018-07-03 20:28:40 +00:00
|
|
|
arg1: "ExcType",
|
|
|
|
arg2: "ExcValue",
|
|
|
|
arg3: "Traceback",
|
|
|
|
proto: "::pyo3::class::context::PyContextExitProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
],
|
|
|
|
py_methods: &[
|
|
|
|
PyMethod {
|
|
|
|
name: "__enter__",
|
2018-06-15 20:50:26 +00:00
|
|
|
proto: "::pyo3::class::context::PyContextEnterProtocolImpl",
|
2017-05-21 05:18:31 +00:00
|
|
|
},
|
|
|
|
PyMethod {
|
|
|
|
name: "__exit__",
|
2018-06-15 20:50:26 +00:00
|
|
|
proto: "::pyo3::class::context::PyContextExitProtocolImpl",
|
2017-05-21 05:18:31 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
2017-05-30 19:42:07 +00:00
|
|
|
pub const GC: Proto = Proto {
|
|
|
|
name: "GC",
|
|
|
|
methods: &[
|
2018-07-03 20:28:40 +00:00
|
|
|
MethodProto::Free {
|
2017-05-30 19:42:07 +00:00
|
|
|
name: "__traverse__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::gc::PyGCTraverseProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Free {
|
2017-05-30 19:42:07 +00:00
|
|
|
name: "__clear__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::gc::PyGCClearProtocol",
|
|
|
|
},
|
2017-05-30 19:42:07 +00:00
|
|
|
],
|
|
|
|
py_methods: &[],
|
|
|
|
};
|
2017-05-29 22:08:19 +00:00
|
|
|
|
2017-05-21 05:18:31 +00:00
|
|
|
pub const DESCR: Proto = Proto {
|
|
|
|
name: "Descriptor",
|
|
|
|
methods: &[
|
|
|
|
MethodProto::Ternary {
|
|
|
|
name: "__get__",
|
|
|
|
arg1: "Inst",
|
|
|
|
arg2: "Owner",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::descr::PyDescrGetProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Ternary {
|
|
|
|
name: "__set__",
|
|
|
|
arg1: "Inst",
|
|
|
|
arg2: "Value",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::descr::PyDescrSetProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__det__",
|
|
|
|
arg: "Inst",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::descr::PyDescrDelProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__set_name__",
|
|
|
|
arg: "Inst",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::descr::PyDescrSetNameProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
],
|
|
|
|
py_methods: &[
|
|
|
|
PyMethod {
|
|
|
|
name: "__del__",
|
2018-06-15 20:50:26 +00:00
|
|
|
proto: "::pyo3::class::context::PyDescrDelProtocolImpl",
|
2017-05-21 05:18:31 +00:00
|
|
|
},
|
|
|
|
PyMethod {
|
|
|
|
name: "__set_name__",
|
2018-06-15 20:50:26 +00:00
|
|
|
proto: "::pyo3::class::context::PyDescrNameProtocolImpl",
|
2017-05-21 05:18:31 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const ITER: Proto = Proto {
|
|
|
|
name: "Iter",
|
|
|
|
py_methods: &[],
|
|
|
|
methods: &[
|
2018-07-03 20:28:40 +00:00
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__iter__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::iter::PyIterIterProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__next__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::iter::PyIterNextProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const MAPPING: Proto = Proto {
|
|
|
|
name: "Mapping",
|
|
|
|
methods: &[
|
2018-07-03 20:28:40 +00:00
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__len__",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::mapping::PyMappingLenProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Binary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__getitem__",
|
|
|
|
arg: "Key",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::mapping::PyMappingGetItemProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Ternary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__setitem__",
|
|
|
|
arg1: "Key",
|
|
|
|
arg2: "Value",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::mapping::PyMappingSetItemProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Binary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__delitem__",
|
|
|
|
arg: "Key",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::mapping::PyMappingDelItemProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Binary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__contains__",
|
|
|
|
arg: "Value",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::mapping::PyMappingContainsProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__reversed__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::mapping::PyMappingReversedProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__iter__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::mapping::PyMappingIterProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
],
|
|
|
|
py_methods: &[
|
|
|
|
PyMethod {
|
|
|
|
name: "__iter__",
|
2017-05-25 03:31:51 +00:00
|
|
|
proto: "::pyo3::class::mapping::PyMappingIterProtocolImpl",
|
2017-05-21 05:18:31 +00:00
|
|
|
},
|
|
|
|
PyMethod {
|
|
|
|
name: "__contains__",
|
2017-05-25 03:31:51 +00:00
|
|
|
proto: "::pyo3::class::mapping::PyMappingContainsProtocolImpl",
|
2017-05-21 05:18:31 +00:00
|
|
|
},
|
|
|
|
PyMethod {
|
|
|
|
name: "__reversed__",
|
2017-05-25 03:31:51 +00:00
|
|
|
proto: "::pyo3::class::mapping::PyMappingReversedProtocolImpl",
|
2017-05-21 05:18:31 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const SEQ: Proto = Proto {
|
|
|
|
name: "Sequence",
|
|
|
|
methods: &[
|
2018-07-03 20:28:40 +00:00
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__len__",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "pyo3::class::sequence::PySequenceLenProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__getitem__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "pyo3::class::sequence::PySequenceGetItemProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Binary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__setitem__",
|
|
|
|
arg: "Value",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "pyo3::class::sequence::PyMappingSetItemProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Binary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__delitem__",
|
|
|
|
arg: "Key",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "pyo3::class::mapping::PyMappingDelItemProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Binary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__contains__",
|
|
|
|
arg: "Item",
|
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "pyo3::class::sequence::PySequenceContainsProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Binary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__concat__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "pyo3::class::sequence::PySequenceConcatProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__repeat__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "pyo3::class::sequence::PySequenceRepeatProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Binary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__inplace_concat__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "pyo3::class::sequence::PySequenceInplaceConcatProtocol",
|
|
|
|
},
|
|
|
|
MethodProto::Unary {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__inplace_repeat__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "pyo3::class::sequence::PySequenceInplaceRepeatProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
],
|
|
|
|
py_methods: &[],
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const NUM: Proto = Proto {
|
|
|
|
name: "Number",
|
|
|
|
methods: &[
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__add__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberAddProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__sub__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberSubProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__mul__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberMulProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__matmul__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberMatmulProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__truediv__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberTruedivProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__floordiv__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberFloordivProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__mod__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberModProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__divmod__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberDivmodProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::TernaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__pow__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
|
|
|
arg3: "Modulo",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberPowProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__lshift__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberLShiftProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__rshift__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRShiftProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__and__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberAndProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__xor__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberXorProtocol",
|
|
|
|
},
|
2017-07-17 23:49:19 +00:00
|
|
|
MethodProto::BinaryS {
|
2017-05-21 05:18:31 +00:00
|
|
|
name: "__or__",
|
2017-07-17 23:49:19 +00:00
|
|
|
arg1: "Left",
|
|
|
|
arg2: "Right",
|
2017-05-21 05:18:31 +00:00
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberOrProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__radd__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRAddProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__rsub__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRSubProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__rmul__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRMulProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__rmatmul__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRMatmulProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__rtruediv__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRTruedivProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__rfloordiv__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRFloordivProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__rmod__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRModProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__rdivmod__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRDivmodProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Ternary {
|
|
|
|
name: "__rpow__",
|
|
|
|
arg1: "Other",
|
|
|
|
arg2: "Modulo",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRPowProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__rlshift__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRLShiftProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__rrshift__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRRShiftProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__rand__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRAndProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__rxor__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRXorProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__ror__",
|
|
|
|
arg: "Other",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberROrProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__iadd__",
|
|
|
|
arg: "Other",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberIAddProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__isub__",
|
|
|
|
arg: "Other",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberISubProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__imul__",
|
|
|
|
arg: "Other",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberIMulProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__imatmul__",
|
|
|
|
arg: "Other",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberIMatmulProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__itruediv__",
|
|
|
|
arg: "Other",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberITruedivProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__ifloordiv__",
|
|
|
|
arg: "Other",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberIFloordivProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__imod__",
|
|
|
|
arg: "Other",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberIModProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Ternary {
|
|
|
|
name: "__ipow__",
|
|
|
|
arg1: "Other",
|
|
|
|
arg2: "Modulo",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberIPowProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__ilshift__",
|
|
|
|
arg: "Other",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberILShiftProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__irshift__",
|
|
|
|
arg: "Other",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberIRShiftProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__iand__",
|
|
|
|
arg: "Other",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberIAndProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__ixor__",
|
|
|
|
arg: "Other",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberIXorProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Binary {
|
|
|
|
name: "__ior__",
|
|
|
|
arg: "Other",
|
2017-05-27 17:49:38 +00:00
|
|
|
pyres: false,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberIOrProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__neg__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberNegProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__pos__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberPosProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__abs__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberAbsProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__invert__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberInvertProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__complex__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberComplexProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__int__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberIntProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__float__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberFloatProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__round__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRoundProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
MethodProto::Unary {
|
|
|
|
name: "__index__",
|
|
|
|
pyres: true,
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberIndexProtocol",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
],
|
|
|
|
py_methods: &[
|
|
|
|
PyMethod {
|
|
|
|
name: "__radd__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRAddProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__rsub__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRSubProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__rmul__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRMulProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__rmatmul__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRMatmulProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__rtruediv__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRTruedivProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__rfloordiv__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRFloordivProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__rmod__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRModProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__rdivmod__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRDivmodProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__rpow__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRPowProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__rlshift__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRLShiftProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__rrshift__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRRShiftProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__rand__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRAndProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__rxor__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRXorProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__ror__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberROrProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__complex__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberComplexProtocolImpl",
|
|
|
|
},
|
2017-05-21 05:18:31 +00:00
|
|
|
PyMethod {
|
|
|
|
name: "__round__",
|
2018-07-03 20:28:40 +00:00
|
|
|
proto: "::pyo3::class::number::PyNumberRoundProtocolImpl",
|
|
|
|
},
|
|
|
|
],
|
2017-05-21 05:18:31 +00:00
|
|
|
};
|