Skip to main content

Protocol

Trait Protocol 

Source
pub trait Protocol: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn open(
        &self,
        url: &str,
        flags: ProtocolFlags,
    ) -> Result<Box<dyn IoContext>>;
}
Expand description

Protocol trait for URL-based I/O.

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn open(&self, url: &str, flags: ProtocolFlags) -> Result<Box<dyn IoContext>>

Trait Implementations§

Source§

impl Collect for &'static dyn Protocol

Implementors§