Skip to main content

Source

Trait Source 

Source
pub trait Source: Copy {
    type Selection;

    // Required method
    fn select(self, bytes: &[u8]) -> Option<Self::Selection>;
}
Expand description

Selects a byte range while preserving its source’s ownership proof.

Required Associated Types§

Required Methods§

Source

fn select(self, bytes: &[u8]) -> Option<Self::Selection>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Source for ()

Source§

type Selection = !

Source§

fn select(self, _: &[u8]) -> Option<Self::Selection>

Implementors§

Source§

impl<'id> Source for View<'_, 'id>