rune/modules/
stream.rs
1use crate as rune;
4use crate::runtime::Stream;
5use crate::{ContextError, Module};
6
7#[rune::module(::std::stream)]
9pub fn module() -> Result<Module, ContextError> {
10 let mut m = Module::from_meta(self::module_meta)?;
11 m.ty::<Stream>()?;
12 m.function_meta(Stream::next_shared__meta)?;
13 m.function_meta(Stream::resume_shared__meta)?;
14 m.function_meta(Stream::debug__meta)?;
15 m.function_meta(Stream::clone__meta)?;
16 m.implement_trait::<Stream>(rune::item!(::std::clone::Clone))?;
17 Ok(m)
18}