pub trait PySequenceProtocol<'p>: PyClass + Sized {
fn __len__(&'p self) -> Self::Result
where
Self: PySequenceLenProtocol<'p>,
{ ... }
fn __getitem__(&'p self, idx: Self::Index) -> Self::Result
where
Self: PySequenceGetItemProtocol<'p>,
{ ... }
fn __setitem__(
&'p mut self,
idx: Self::Index,
value: Self::Value
) -> Self::Result
where
Self: PySequenceSetItemProtocol<'p>,
{ ... }
fn __delitem__(&'p mut self, idx: Self::Index) -> Self::Result
where
Self: PySequenceDelItemProtocol<'p>,
{ ... }
fn __contains__(&'p self, item: Self::Item) -> Self::Result
where
Self: PySequenceContainsProtocol<'p>,
{ ... }
fn __concat__(&'p self, other: Self::Other) -> Self::Result
where
Self: PySequenceConcatProtocol<'p>,
{ ... }
fn __repeat__(&'p self, count: Self::Index) -> Self::Result
where
Self: PySequenceRepeatProtocol<'p>,
{ ... }
fn __inplace_concat__(&'p mut self, other: Self::Other) -> Self::Result
where
Self: PySequenceInplaceConcatProtocol<'p>,
{ ... }
fn __inplace_repeat__(&'p mut self, count: Self::Index) -> Self::Result
where
Self: PySequenceInplaceRepeatProtocol<'p>,
{ ... }
}
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]
Expand description
Sequence interface
Provided Methods
fn __len__(&'p self) -> Self::Result where
Self: PySequenceLenProtocol<'p>,
fn __len__(&'p self) -> Self::Result where
Self: PySequenceLenProtocol<'p>,
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]
fn __getitem__(&'p self, idx: Self::Index) -> Self::Result where
Self: PySequenceGetItemProtocol<'p>,
fn __getitem__(&'p self, idx: Self::Index) -> Self::Result where
Self: PySequenceGetItemProtocol<'p>,
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]
fn __setitem__(
&'p mut self,
idx: Self::Index,
value: Self::Value
) -> Self::Result where
Self: PySequenceSetItemProtocol<'p>,
fn __setitem__(
&'p mut self,
idx: Self::Index,
value: Self::Value
) -> Self::Result where
Self: PySequenceSetItemProtocol<'p>,
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]
fn __delitem__(&'p mut self, idx: Self::Index) -> Self::Result where
Self: PySequenceDelItemProtocol<'p>,
fn __delitem__(&'p mut self, idx: Self::Index) -> Self::Result where
Self: PySequenceDelItemProtocol<'p>,
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]
fn __contains__(&'p self, item: Self::Item) -> Self::Result where
Self: PySequenceContainsProtocol<'p>,
fn __contains__(&'p self, item: Self::Item) -> Self::Result where
Self: PySequenceContainsProtocol<'p>,
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]
fn __concat__(&'p self, other: Self::Other) -> Self::Result where
Self: PySequenceConcatProtocol<'p>,
fn __concat__(&'p self, other: Self::Other) -> Self::Result where
Self: PySequenceConcatProtocol<'p>,
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]
fn __repeat__(&'p self, count: Self::Index) -> Self::Result where
Self: PySequenceRepeatProtocol<'p>,
fn __repeat__(&'p self, count: Self::Index) -> Self::Result where
Self: PySequenceRepeatProtocol<'p>,
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]
fn __inplace_concat__(&'p mut self, other: Self::Other) -> Self::Result where
Self: PySequenceInplaceConcatProtocol<'p>,
fn __inplace_concat__(&'p mut self, other: Self::Other) -> Self::Result where
Self: PySequenceInplaceConcatProtocol<'p>,
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]
fn __inplace_repeat__(&'p mut self, count: Self::Index) -> Self::Result where
Self: PySequenceInplaceRepeatProtocol<'p>,
fn __inplace_repeat__(&'p mut self, count: Self::Index) -> Self::Result where
Self: PySequenceInplaceRepeatProtocol<'p>,
👎 Deprecated since 0.16.0:
prefer #[pymethods]
to #[pyproto]