Run cargo fmt
on source code and update CHANGELOG.md
This commit is contained in:
parent
5397a62f48
commit
33bf37d3d8
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
### Fixed
|
||||
|
||||
* Make sure the right Python interpreter is used in OSX builds. [#604](https://github.com/PyO3/pyo3/pull/604)
|
||||
* Patch specialization being broken by Rust 1.40 [#614](https://github.com/PyO3/pyo3/issues/614)
|
||||
|
||||
## [0.8.0] - 2018-09-05
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ pub fn gen_py_method(
|
|||
return Err(syn::Error::new_spanned(
|
||||
spec.args[0].ty,
|
||||
"Getter function can only have one argument of type pyo3::Python!",
|
||||
))
|
||||
));
|
||||
}
|
||||
};
|
||||
impl_py_getter_def(name, doc, getter, &impl_wrap_getter(cls, name, takes_py))
|
||||
|
@ -60,10 +60,10 @@ fn check_generic(name: &syn::Ident, sig: &syn::Signature) -> syn::Result<()> {
|
|||
match param {
|
||||
syn::GenericParam::Lifetime(_) => {}
|
||||
syn::GenericParam::Type(_) => {
|
||||
return Err(syn::Error::new_spanned(param, err_msg("type")))
|
||||
return Err(syn::Error::new_spanned(param, err_msg("type")));
|
||||
}
|
||||
syn::GenericParam::Const(_) => {
|
||||
return Err(syn::Error::new_spanned(param, err_msg("const")))
|
||||
return Err(syn::Error::new_spanned(param, err_msg("const")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -202,7 +202,10 @@ trait GetAttrProtocolImpl {
|
|||
fn tp_getattro() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> GetAttrProtocolImpl for T where T: PyObjectProtocol<'p> {
|
||||
impl<'p, T> GetAttrProtocolImpl for T
|
||||
where
|
||||
T: PyObjectProtocol<'p>,
|
||||
{
|
||||
default fn tp_getattro() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -296,7 +299,10 @@ mod tp_setattro_impl {
|
|||
fn del_attr() -> Option<ffi::setattrofunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> DelAttr for T where T: PyObjectProtocol<'p> {
|
||||
impl<'p, T> DelAttr for T
|
||||
where
|
||||
T: PyObjectProtocol<'p>,
|
||||
{
|
||||
default fn del_attr() -> Option<ffi::setattrofunc> {
|
||||
None
|
||||
}
|
||||
|
@ -315,7 +321,10 @@ mod tp_setattro_impl {
|
|||
fn set_del_attr() -> Option<ffi::setattrofunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> SetDelAttr for T where T: PyObjectProtocol<'p> {
|
||||
impl<'p, T> SetDelAttr for T
|
||||
where
|
||||
T: PyObjectProtocol<'p>,
|
||||
{
|
||||
default fn set_del_attr() -> Option<ffi::setattrofunc> {
|
||||
None
|
||||
}
|
||||
|
@ -340,7 +349,10 @@ mod tp_setattro_impl {
|
|||
trait StrProtocolImpl {
|
||||
fn tp_str() -> Option<ffi::unaryfunc>;
|
||||
}
|
||||
impl<'p, T> StrProtocolImpl for T where T: PyObjectProtocol<'p> {
|
||||
impl<'p, T> StrProtocolImpl for T
|
||||
where
|
||||
T: PyObjectProtocol<'p>,
|
||||
{
|
||||
default fn tp_str() -> Option<ffi::unaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -362,7 +374,10 @@ where
|
|||
trait ReprProtocolImpl {
|
||||
fn tp_repr() -> Option<ffi::unaryfunc>;
|
||||
}
|
||||
impl<'p, T> ReprProtocolImpl for T where T: PyObjectProtocol<'p> {
|
||||
impl<'p, T> ReprProtocolImpl for T
|
||||
where
|
||||
T: PyObjectProtocol<'p>,
|
||||
{
|
||||
default fn tp_repr() -> Option<ffi::unaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -385,7 +400,10 @@ where
|
|||
pub trait FormatProtocolImpl {
|
||||
fn __format__() -> Option<PyMethodDef>;
|
||||
}
|
||||
impl<'p, T> FormatProtocolImpl for T where T: PyObjectProtocol<'p> {
|
||||
impl<'p, T> FormatProtocolImpl for T
|
||||
where
|
||||
T: PyObjectProtocol<'p>,
|
||||
{
|
||||
default fn __format__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -395,7 +413,10 @@ impl<'p, T> FormatProtocolImpl for T where T: PyObjectProtocol<'p> {
|
|||
pub trait BytesProtocolImpl {
|
||||
fn __bytes__() -> Option<PyMethodDef>;
|
||||
}
|
||||
impl<'p, T> BytesProtocolImpl for T where T: PyObjectProtocol<'p> {
|
||||
impl<'p, T> BytesProtocolImpl for T
|
||||
where
|
||||
T: PyObjectProtocol<'p>,
|
||||
{
|
||||
default fn __bytes__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -405,7 +426,10 @@ impl<'p, T> BytesProtocolImpl for T where T: PyObjectProtocol<'p> {
|
|||
pub trait UnicodeProtocolImpl {
|
||||
fn __unicode__() -> Option<PyMethodDef>;
|
||||
}
|
||||
impl<'p, T> UnicodeProtocolImpl for T where T: PyObjectProtocol<'p> {
|
||||
impl<'p, T> UnicodeProtocolImpl for T
|
||||
where
|
||||
T: PyObjectProtocol<'p>,
|
||||
{
|
||||
default fn __unicode__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -414,7 +438,10 @@ impl<'p, T> UnicodeProtocolImpl for T where T: PyObjectProtocol<'p> {
|
|||
trait HashProtocolImpl {
|
||||
fn tp_hash() -> Option<ffi::hashfunc>;
|
||||
}
|
||||
impl<'p, T> HashProtocolImpl for T where T: PyObjectProtocol<'p> {
|
||||
impl<'p, T> HashProtocolImpl for T
|
||||
where
|
||||
T: PyObjectProtocol<'p>,
|
||||
{
|
||||
default fn tp_hash() -> Option<ffi::hashfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -437,7 +464,10 @@ where
|
|||
trait BoolProtocolImpl {
|
||||
fn nb_bool() -> Option<ffi::inquiry>;
|
||||
}
|
||||
impl<'p, T> BoolProtocolImpl for T where T: PyObjectProtocol<'p> {
|
||||
impl<'p, T> BoolProtocolImpl for T
|
||||
where
|
||||
T: PyObjectProtocol<'p>,
|
||||
{
|
||||
default fn nb_bool() -> Option<ffi::inquiry> {
|
||||
None
|
||||
}
|
||||
|
@ -460,7 +490,10 @@ where
|
|||
trait RichcmpProtocolImpl {
|
||||
fn tp_richcompare() -> Option<ffi::richcmpfunc>;
|
||||
}
|
||||
impl<'p, T> RichcmpProtocolImpl for T where T: PyObjectProtocol<'p> {
|
||||
impl<'p, T> RichcmpProtocolImpl for T
|
||||
where
|
||||
T: PyObjectProtocol<'p>,
|
||||
{
|
||||
default fn tp_richcompare() -> Option<ffi::richcmpfunc> {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -69,7 +69,10 @@ trait PyBufferGetBufferProtocolImpl {
|
|||
fn cb_bf_getbuffer() -> Option<ffi::getbufferproc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyBufferGetBufferProtocolImpl for T where T: PyBufferProtocol<'p> {
|
||||
impl<'p, T> PyBufferGetBufferProtocolImpl for T
|
||||
where
|
||||
T: PyBufferProtocol<'p>,
|
||||
{
|
||||
default fn cb_bf_getbuffer() -> Option<ffi::getbufferproc> {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -80,7 +80,10 @@ pub trait PyContextEnterProtocolImpl {
|
|||
fn __enter__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyContextEnterProtocolImpl for T where T: PyContextProtocol<'p> {
|
||||
impl<'p, T> PyContextEnterProtocolImpl for T
|
||||
where
|
||||
T: PyContextProtocol<'p>,
|
||||
{
|
||||
default fn __enter__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -91,7 +94,10 @@ pub trait PyContextExitProtocolImpl {
|
|||
fn __exit__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyContextExitProtocolImpl for T where T: PyContextProtocol<'p> {
|
||||
impl<'p, T> PyContextExitProtocolImpl for T
|
||||
where
|
||||
T: PyContextProtocol<'p>,
|
||||
{
|
||||
default fn __exit__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -72,7 +72,10 @@ pub trait PyDescrSetNameProtocol<'p>: PyDescrProtocol<'p> {
|
|||
trait PyDescrGetProtocolImpl {
|
||||
fn tp_descr_get() -> Option<ffi::descrgetfunc>;
|
||||
}
|
||||
impl<'p, T> PyDescrGetProtocolImpl for T where T: PyDescrProtocol<'p> {
|
||||
impl<'p, T> PyDescrGetProtocolImpl for T
|
||||
where
|
||||
T: PyDescrProtocol<'p>,
|
||||
{
|
||||
default fn tp_descr_get() -> Option<ffi::descrgetfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -95,7 +98,10 @@ where
|
|||
trait PyDescrSetProtocolImpl {
|
||||
fn tp_descr_set() -> Option<ffi::descrsetfunc>;
|
||||
}
|
||||
impl<'p, T> PyDescrSetProtocolImpl for T where T: PyDescrProtocol<'p> {
|
||||
impl<'p, T> PyDescrSetProtocolImpl for T
|
||||
where
|
||||
T: PyDescrProtocol<'p>,
|
||||
{
|
||||
default fn tp_descr_set() -> Option<ffi::descrsetfunc> {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -68,7 +68,10 @@ trait PyGCTraverseProtocolImpl {
|
|||
fn tp_traverse() -> Option<ffi::traverseproc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyGCTraverseProtocolImpl for T where T: PyGCProtocol<'p> {
|
||||
impl<'p, T> PyGCTraverseProtocolImpl for T
|
||||
where
|
||||
T: PyGCProtocol<'p>,
|
||||
{
|
||||
default fn tp_traverse() -> Option<ffi::traverseproc> {
|
||||
None
|
||||
}
|
||||
|
@ -112,7 +115,10 @@ trait PyGCClearProtocolImpl {
|
|||
fn tp_clear() -> Option<ffi::inquiry>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyGCClearProtocolImpl for T where T: PyGCProtocol<'p> {
|
||||
impl<'p, T> PyGCClearProtocolImpl for T
|
||||
where
|
||||
T: PyGCProtocol<'p>,
|
||||
{
|
||||
default fn tp_clear() -> Option<ffi::inquiry> {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -66,7 +66,10 @@ trait PyIterIterProtocolImpl {
|
|||
fn tp_iter() -> Option<ffi::getiterfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyIterIterProtocolImpl for T where T: PyIterProtocol<'p> {
|
||||
impl<'p, T> PyIterIterProtocolImpl for T
|
||||
where
|
||||
T: PyIterProtocol<'p>,
|
||||
{
|
||||
default fn tp_iter() -> Option<ffi::getiterfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -91,7 +94,10 @@ trait PyIterNextProtocolImpl {
|
|||
fn tp_iternext() -> Option<ffi::iternextfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyIterNextProtocolImpl for T where T: PyIterProtocol<'p> {
|
||||
impl<'p, T> PyIterNextProtocolImpl for T
|
||||
where
|
||||
T: PyIterProtocol<'p>,
|
||||
{
|
||||
default fn tp_iternext() -> Option<ffi::iternextfunc> {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -160,7 +160,10 @@ trait PyMappingLenProtocolImpl {
|
|||
fn mp_length() -> Option<ffi::lenfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyMappingLenProtocolImpl for T where T: PyMappingProtocol<'p> {
|
||||
impl<'p, T> PyMappingLenProtocolImpl for T
|
||||
where
|
||||
T: PyMappingProtocol<'p>,
|
||||
{
|
||||
default fn mp_length() -> Option<ffi::lenfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -180,7 +183,10 @@ trait PyMappingGetItemProtocolImpl {
|
|||
fn mp_subscript() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyMappingGetItemProtocolImpl for T where T: PyMappingProtocol<'p> {
|
||||
impl<'p, T> PyMappingGetItemProtocolImpl for T
|
||||
where
|
||||
T: PyMappingProtocol<'p>,
|
||||
{
|
||||
default fn mp_subscript() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -205,7 +211,10 @@ trait PyMappingSetItemProtocolImpl {
|
|||
fn mp_ass_subscript() -> Option<ffi::objobjargproc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyMappingSetItemProtocolImpl for T where T: PyMappingProtocol<'p> {
|
||||
impl<'p, T> PyMappingSetItemProtocolImpl for T
|
||||
where
|
||||
T: PyMappingProtocol<'p>,
|
||||
{
|
||||
default fn mp_ass_subscript() -> Option<ffi::objobjargproc> {
|
||||
None
|
||||
}
|
||||
|
@ -227,7 +236,10 @@ trait DeplItemDipatch {
|
|||
fn mp_del_subscript() -> Option<ffi::objobjargproc>;
|
||||
}
|
||||
|
||||
impl<'p, T> DeplItemDipatch for T where T: PyMappingProtocol<'p> {
|
||||
impl<'p, T> DeplItemDipatch for T
|
||||
where
|
||||
T: PyMappingProtocol<'p>,
|
||||
{
|
||||
default fn mp_del_subscript() -> Option<ffi::objobjargproc> {
|
||||
None
|
||||
}
|
||||
|
@ -238,7 +250,10 @@ trait DelSetItemDispatch: Sized + for<'p> PyMappingDelItemProtocol<'p> {
|
|||
fn det_set_dispatch() -> Option<ffi::objobjargproc>;
|
||||
}
|
||||
|
||||
impl<T> DelSetItemDispatch for T where T: Sized + for<'p> PyMappingDelItemProtocol<'p> {
|
||||
impl<T> DelSetItemDispatch for T
|
||||
where
|
||||
T: Sized + for<'p> PyMappingDelItemProtocol<'p>,
|
||||
{
|
||||
default fn det_set_dispatch() -> Option<ffi::objobjargproc> {
|
||||
py_func_del!(PyMappingDelItemProtocol, Self, __delitem__)
|
||||
}
|
||||
|
@ -273,7 +288,10 @@ pub trait PyMappingContainsProtocolImpl {
|
|||
fn __contains__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyMappingContainsProtocolImpl for T where T: PyMappingProtocol<'p> {
|
||||
impl<'p, T> PyMappingContainsProtocolImpl for T
|
||||
where
|
||||
T: PyMappingProtocol<'p>,
|
||||
{
|
||||
default fn __contains__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -284,7 +302,10 @@ pub trait PyMappingReversedProtocolImpl {
|
|||
fn __reversed__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyMappingReversedProtocolImpl for T where T: PyMappingProtocol<'p> {
|
||||
impl<'p, T> PyMappingReversedProtocolImpl for T
|
||||
where
|
||||
T: PyMappingProtocol<'p>,
|
||||
{
|
||||
default fn __reversed__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -295,7 +316,10 @@ pub trait PyMappingIterProtocolImpl {
|
|||
fn __iter__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyMappingIterProtocolImpl for T where T: PyMappingProtocol<'p> {
|
||||
impl<'p, T> PyMappingIterProtocolImpl for T
|
||||
where
|
||||
T: PyMappingProtocol<'p>,
|
||||
{
|
||||
default fn __iter__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -749,7 +749,10 @@ trait PyNumberAddProtocolImpl {
|
|||
fn nb_add() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberAddProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberAddProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_add() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -773,7 +776,10 @@ trait PyNumberSubProtocolImpl {
|
|||
fn nb_subtract() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberSubProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberSubProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_subtract() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -797,7 +803,10 @@ trait PyNumberMulProtocolImpl {
|
|||
fn nb_multiply() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberMulProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberMulProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_multiply() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -821,7 +830,10 @@ trait PyNumberMatmulProtocolImpl {
|
|||
fn nb_matrix_multiply() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberMatmulProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberMatmulProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_matrix_multiply() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -845,7 +857,10 @@ trait PyNumberTruedivProtocolImpl {
|
|||
fn nb_true_divide() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberTruedivProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberTruedivProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_true_divide() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -869,7 +884,10 @@ trait PyNumberFloordivProtocolImpl {
|
|||
fn nb_floor_divide() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberFloordivProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberFloordivProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_floor_divide() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -893,7 +911,10 @@ trait PyNumberModProtocolImpl {
|
|||
fn nb_remainder() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberModProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberModProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_remainder() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -917,7 +938,10 @@ trait PyNumberDivmodProtocolImpl {
|
|||
fn nb_divmod() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberDivmodProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberDivmodProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_divmod() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -941,7 +965,10 @@ trait PyNumberPowProtocolImpl {
|
|||
fn nb_power() -> Option<ffi::ternaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberPowProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberPowProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_power() -> Option<ffi::ternaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -965,7 +992,10 @@ trait PyNumberLShiftProtocolImpl {
|
|||
fn nb_lshift() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberLShiftProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberLShiftProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_lshift() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -989,7 +1019,10 @@ trait PyNumberRShiftProtocolImpl {
|
|||
fn nb_rshift() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRShiftProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRShiftProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_rshift() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1013,7 +1046,10 @@ trait PyNumberAndProtocolImpl {
|
|||
fn nb_and() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberAndProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberAndProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_and() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1037,7 +1073,10 @@ trait PyNumberXorProtocolImpl {
|
|||
fn nb_xor() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberXorProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberXorProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_xor() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1061,7 +1100,10 @@ trait PyNumberOrProtocolImpl {
|
|||
fn nb_or() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberOrProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberOrProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_or() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1085,7 +1127,10 @@ trait PyNumberIAddProtocolImpl {
|
|||
fn nb_inplace_add() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberIAddProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberIAddProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_add() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1104,7 +1149,10 @@ trait PyNumberISubProtocolImpl {
|
|||
fn nb_inplace_subtract() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberISubProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberISubProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_subtract() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1123,7 +1171,10 @@ trait PyNumberIMulProtocolImpl {
|
|||
fn nb_inplace_multiply() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberIMulProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberIMulProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_multiply() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1142,7 +1193,10 @@ trait PyNumberIMatmulProtocolImpl {
|
|||
fn nb_inplace_matrix_multiply() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberIMatmulProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberIMatmulProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_matrix_multiply() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1161,7 +1215,10 @@ trait PyNumberITruedivProtocolImpl {
|
|||
fn nb_inplace_true_divide() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberITruedivProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberITruedivProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_true_divide() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1180,7 +1237,10 @@ trait PyNumberIFloordivProtocolImpl {
|
|||
fn nb_inplace_floor_divide() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberIFloordivProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberIFloordivProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_floor_divide() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1199,7 +1259,10 @@ trait PyNumberIModProtocolImpl {
|
|||
fn nb_inplace_remainder() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberIModProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberIModProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_remainder() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1218,7 +1281,10 @@ trait PyNumberIPowProtocolImpl {
|
|||
fn nb_inplace_power() -> Option<ffi::ternaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberIPowProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberIPowProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_power() -> Option<ffi::ternaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1237,7 +1303,10 @@ trait PyNumberILShiftProtocolImpl {
|
|||
fn nb_inplace_lshift() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberILShiftProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberILShiftProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_lshift() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1256,7 +1325,10 @@ trait PyNumberIRShiftProtocolImpl {
|
|||
fn nb_inplace_rshift() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberIRShiftProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberIRShiftProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_rshift() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1275,7 +1347,10 @@ trait PyNumberIAndProtocolImpl {
|
|||
fn nb_inplace_and() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberIAndProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberIAndProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_and() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1294,7 +1369,10 @@ trait PyNumberIXorProtocolImpl {
|
|||
fn nb_inplace_xor() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberIXorProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberIXorProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_xor() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1313,7 +1391,10 @@ trait PyNumberIOrProtocolImpl {
|
|||
fn nb_inplace_or() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberIOrProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberIOrProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_inplace_or() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1333,7 +1414,10 @@ pub trait PyNumberRAddProtocolImpl {
|
|||
fn __radd__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRAddProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRAddProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __radd__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1353,7 +1437,10 @@ pub trait PyNumberRMulProtocolImpl {
|
|||
fn __rmul__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRMulProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRMulProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __rmul__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1364,7 +1451,10 @@ pub trait PyNumberRMatmulProtocolImpl {
|
|||
fn __rmatmul__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRMatmulProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRMatmulProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __rmatmul__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1375,7 +1465,10 @@ pub trait PyNumberRTruedivProtocolImpl {
|
|||
fn __rtruediv__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRTruedivProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRTruedivProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __rtruediv__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1386,7 +1479,10 @@ pub trait PyNumberRFloordivProtocolImpl {
|
|||
fn __rfloordiv__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRFloordivProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRFloordivProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __rfloordiv__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1397,7 +1493,10 @@ pub trait PyNumberRModProtocolImpl {
|
|||
fn __rmod__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRModProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRModProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __rmod__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1408,7 +1507,10 @@ pub trait PyNumberRDivmodProtocolImpl {
|
|||
fn __rdivmod__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRDivmodProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRDivmodProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __rdivmod__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1419,7 +1521,10 @@ pub trait PyNumberRPowProtocolImpl {
|
|||
fn __rpow__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRPowProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRPowProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __rpow__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1430,7 +1535,10 @@ pub trait PyNumberRLShiftProtocolImpl {
|
|||
fn __rlshift__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRLShiftProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRLShiftProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __rlshift__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1441,7 +1549,10 @@ pub trait PyNumberRRShiftProtocolImpl {
|
|||
fn __rrshift__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRRShiftProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRRShiftProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __rrshift__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1452,7 +1563,10 @@ pub trait PyNumberRAndProtocolImpl {
|
|||
fn __rand__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRAndProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRAndProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __rand__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1463,7 +1577,10 @@ pub trait PyNumberRXorProtocolImpl {
|
|||
fn __rxor__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRXorProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRXorProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __rxor__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1474,7 +1591,10 @@ pub trait PyNumberROrProtocolImpl {
|
|||
fn __ror__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberROrProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberROrProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __ror__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1484,7 +1604,10 @@ trait PyNumberNegProtocolImpl {
|
|||
fn nb_negative() -> Option<ffi::unaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberNegProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberNegProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_negative() -> Option<ffi::unaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1509,7 +1632,10 @@ trait PyNumberPosProtocolImpl {
|
|||
fn nb_positive() -> Option<ffi::unaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberPosProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberPosProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_positive() -> Option<ffi::unaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1533,7 +1659,10 @@ trait PyNumberAbsProtocolImpl {
|
|||
fn nb_absolute() -> Option<ffi::unaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberAbsProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberAbsProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_absolute() -> Option<ffi::unaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1557,7 +1686,10 @@ trait PyNumberInvertProtocolImpl {
|
|||
fn nb_invert() -> Option<ffi::unaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberInvertProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberInvertProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_invert() -> Option<ffi::unaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1581,7 +1713,10 @@ trait PyNumberIntProtocolImpl {
|
|||
fn nb_int() -> Option<ffi::unaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberIntProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberIntProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_int() -> Option<ffi::unaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1605,7 +1740,10 @@ trait PyNumberFloatProtocolImpl {
|
|||
fn nb_float() -> Option<ffi::unaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberFloatProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberFloatProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_float() -> Option<ffi::unaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1629,7 +1767,10 @@ trait PyNumberIndexProtocolImpl {
|
|||
fn nb_index() -> Option<ffi::unaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberIndexProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberIndexProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn nb_index() -> Option<ffi::unaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -1653,7 +1794,10 @@ trait PyNumberComplexProtocolImpl {
|
|||
fn __complex__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberComplexProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberComplexProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __complex__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -1663,7 +1807,10 @@ trait PyNumberRoundProtocolImpl {
|
|||
fn __round__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyNumberRoundProtocolImpl for T where T: PyNumberProtocol<'p> {
|
||||
impl<'p, T> PyNumberRoundProtocolImpl for T
|
||||
where
|
||||
T: PyNumberProtocol<'p>,
|
||||
{
|
||||
default fn __round__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -137,7 +137,10 @@ trait PyAsyncAwaitProtocolImpl {
|
|||
fn am_await() -> Option<ffi::unaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyAsyncAwaitProtocolImpl for T where T: PyAsyncProtocol<'p> {
|
||||
impl<'p, T> PyAsyncAwaitProtocolImpl for T
|
||||
where
|
||||
T: PyAsyncProtocol<'p>,
|
||||
{
|
||||
default fn am_await() -> Option<ffi::unaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -162,7 +165,10 @@ trait PyAsyncAiterProtocolImpl {
|
|||
fn am_aiter() -> Option<ffi::unaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyAsyncAiterProtocolImpl for T where T: PyAsyncProtocol<'p> {
|
||||
impl<'p, T> PyAsyncAiterProtocolImpl for T
|
||||
where
|
||||
T: PyAsyncProtocol<'p>,
|
||||
{
|
||||
default fn am_aiter() -> Option<ffi::unaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -187,7 +193,10 @@ trait PyAsyncAnextProtocolImpl {
|
|||
fn am_anext() -> Option<ffi::unaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyAsyncAnextProtocolImpl for T where T: PyAsyncProtocol<'p> {
|
||||
impl<'p, T> PyAsyncAnextProtocolImpl for T
|
||||
where
|
||||
T: PyAsyncProtocol<'p>,
|
||||
{
|
||||
default fn am_anext() -> Option<ffi::unaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -245,7 +254,10 @@ trait PyAsyncAenterProtocolImpl {
|
|||
fn __aenter__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyAsyncAenterProtocolImpl for T where T: PyAsyncProtocol<'p> {
|
||||
impl<'p, T> PyAsyncAenterProtocolImpl for T
|
||||
where
|
||||
T: PyAsyncProtocol<'p>,
|
||||
{
|
||||
default fn __aenter__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
@ -255,7 +267,10 @@ trait PyAsyncAexitProtocolImpl {
|
|||
fn __aexit__() -> Option<PyMethodDef>;
|
||||
}
|
||||
|
||||
impl<'p, T> PyAsyncAexitProtocolImpl for T where T: PyAsyncProtocol<'p> {
|
||||
impl<'p, T> PyAsyncAexitProtocolImpl for T
|
||||
where
|
||||
T: PyAsyncProtocol<'p>,
|
||||
{
|
||||
default fn __aexit__() -> Option<PyMethodDef> {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -167,7 +167,10 @@ trait PySequenceLenProtocolImpl {
|
|||
fn sq_length() -> Option<ffi::lenfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PySequenceLenProtocolImpl for T where T: PySequenceProtocol<'p> {
|
||||
impl<'p, T> PySequenceLenProtocolImpl for T
|
||||
where
|
||||
T: PySequenceProtocol<'p>,
|
||||
{
|
||||
default fn sq_length() -> Option<ffi::lenfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -186,7 +189,10 @@ trait PySequenceGetItemProtocolImpl {
|
|||
fn sq_item() -> Option<ffi::ssizeargfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PySequenceGetItemProtocolImpl for T where T: PySequenceProtocol<'p> {
|
||||
impl<'p, T> PySequenceGetItemProtocolImpl for T
|
||||
where
|
||||
T: PySequenceProtocol<'p>,
|
||||
{
|
||||
default fn sq_item() -> Option<ffi::ssizeargfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -210,7 +216,10 @@ trait PySequenceSetItemProtocolImpl {
|
|||
fn sq_ass_item() -> Option<ffi::ssizeobjargproc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PySequenceSetItemProtocolImpl for T where T: PySequenceProtocol<'p> {
|
||||
impl<'p, T> PySequenceSetItemProtocolImpl for T
|
||||
where
|
||||
T: PySequenceProtocol<'p>,
|
||||
{
|
||||
default fn sq_ass_item() -> Option<ffi::ssizeobjargproc> {
|
||||
None
|
||||
}
|
||||
|
@ -286,7 +295,10 @@ mod sq_ass_item_impl {
|
|||
fn del_item() -> Option<ffi::ssizeobjargproc>;
|
||||
}
|
||||
|
||||
impl<'p, T> DelItem for T where T: PySequenceProtocol<'p> {
|
||||
impl<'p, T> DelItem for T
|
||||
where
|
||||
T: PySequenceProtocol<'p>,
|
||||
{
|
||||
default fn del_item() -> Option<ffi::ssizeobjargproc> {
|
||||
None
|
||||
}
|
||||
|
@ -334,7 +346,10 @@ mod sq_ass_item_impl {
|
|||
fn del_set_item() -> Option<ffi::ssizeobjargproc>;
|
||||
}
|
||||
|
||||
impl<'p, T> DelSetItem for T where T: PySequenceProtocol<'p> {
|
||||
impl<'p, T> DelSetItem for T
|
||||
where
|
||||
T: PySequenceProtocol<'p>,
|
||||
{
|
||||
default fn del_set_item() -> Option<ffi::ssizeobjargproc> {
|
||||
None
|
||||
}
|
||||
|
@ -383,7 +398,10 @@ trait PySequenceContainsProtocolImpl {
|
|||
fn sq_contains() -> Option<ffi::objobjproc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PySequenceContainsProtocolImpl for T where T: PySequenceProtocol<'p> {
|
||||
impl<'p, T> PySequenceContainsProtocolImpl for T
|
||||
where
|
||||
T: PySequenceProtocol<'p>,
|
||||
{
|
||||
default fn sq_contains() -> Option<ffi::objobjproc> {
|
||||
None
|
||||
}
|
||||
|
@ -408,7 +426,10 @@ trait PySequenceConcatProtocolImpl {
|
|||
fn sq_concat() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PySequenceConcatProtocolImpl for T where T: PySequenceProtocol<'p> {
|
||||
impl<'p, T> PySequenceConcatProtocolImpl for T
|
||||
where
|
||||
T: PySequenceProtocol<'p>,
|
||||
{
|
||||
default fn sq_concat() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -432,7 +453,10 @@ trait PySequenceRepeatProtocolImpl {
|
|||
fn sq_repeat() -> Option<ffi::ssizeargfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PySequenceRepeatProtocolImpl for T where T: PySequenceProtocol<'p> {
|
||||
impl<'p, T> PySequenceRepeatProtocolImpl for T
|
||||
where
|
||||
T: PySequenceProtocol<'p>,
|
||||
{
|
||||
default fn sq_repeat() -> Option<ffi::ssizeargfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -456,7 +480,10 @@ trait PySequenceInplaceConcatProtocolImpl {
|
|||
fn sq_inplace_concat() -> Option<ffi::binaryfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PySequenceInplaceConcatProtocolImpl for T where T: PySequenceProtocol<'p> {
|
||||
impl<'p, T> PySequenceInplaceConcatProtocolImpl for T
|
||||
where
|
||||
T: PySequenceProtocol<'p>,
|
||||
{
|
||||
default fn sq_inplace_concat() -> Option<ffi::binaryfunc> {
|
||||
None
|
||||
}
|
||||
|
@ -480,7 +507,10 @@ trait PySequenceInplaceRepeatProtocolImpl {
|
|||
fn sq_inplace_repeat() -> Option<ffi::ssizeargfunc>;
|
||||
}
|
||||
|
||||
impl<'p, T> PySequenceInplaceRepeatProtocolImpl for T where T: PySequenceProtocol<'p> {
|
||||
impl<'p, T> PySequenceInplaceRepeatProtocolImpl for T
|
||||
where
|
||||
T: PySequenceProtocol<'p>,
|
||||
{
|
||||
default fn sq_inplace_repeat() -> Option<ffi::ssizeargfunc> {
|
||||
None
|
||||
}
|
||||
|
|
|
@ -100,7 +100,10 @@ pub trait ToBorrowedObject: ToPyObject {
|
|||
F: FnOnce(*mut ffi::PyObject) -> R;
|
||||
}
|
||||
|
||||
impl<T> ToBorrowedObject for T where T: ToPyObject {
|
||||
impl<T> ToBorrowedObject for T
|
||||
where
|
||||
T: ToPyObject,
|
||||
{
|
||||
default fn with_borrowed_ptr<F, R>(&self, py: Python, f: F) -> R
|
||||
where
|
||||
F: FnOnce(*mut ffi::PyObject) -> R,
|
||||
|
|
Loading…
Reference in a new issue