Skip to main content

## WithSource

# Trait WithSource

Source

    pub trait WithSource {
        // Required method
        fn with_source(
            &self,
            f: &mut dyn FnMut(&mut dyn Source) -> Result<()>,
        ) -> Result<()>;
    }

Expand description

Trait for values that contain a mio [`Source`].

## Required Methods§

Source

#### fn with_source( &self, f: &mut dyn FnMut(&mut dyn Source) -> Result<()>, ) -> Result<()>

Invoke `f` on the source inside `self`.

## Implementors§

Source§

### impl WithSource for Socket