Trait core::slice::SlicePattern[][src]

pub trait SlicePattern {
    type Item;
    fn as_slice(&self) -> &[Self::Item];
}
🔬 This is a nightly-only experimental API. (slice_pattern #56345)

stopgap trait for slice patterns

Expand description

切片中的模式 - 当前,仅由 strip_prefixstrip_suffix 使用。 在 future 指针上,我们希望将 core::str::Pattern (在撰写本文时仅限于 str) 推广到切片,然后将替换或废除此 trait。

Associated Types

🔬 This is a nightly-only experimental API. (slice_pattern #56345)

stopgap trait for slice patterns

匹配的切片的元素类型。

Required methods

🔬 This is a nightly-only experimental API. (slice_pattern #56345)

stopgap trait for slice patterns

当前,SlicePattern 的消费者需要切片。

Implementors

🔬 This is a nightly-only experimental API. (slice_pattern #56345)

stopgap trait for slice patterns

🔬 This is a nightly-only experimental API. (slice_pattern #56345)

stopgap trait for slice patterns

🔬 This is a nightly-only experimental API. (slice_pattern #56345)

stopgap trait for slice patterns

🔬 This is a nightly-only experimental API. (slice_pattern #56345)

stopgap trait for slice patterns