/// Creates and routes a read-only directory capability to the given targets. The directory
/// capability will have the given name, and anyone accessing the directory will see the given
/// contents.
Creates and routes a read-only directory capability to the given targets. The directory
capability will have the given name, and anyone accessing the directory will see the given
contents.
Creates and routes a read - only directory capability to the given targets . The directory capability will have the given name and anyone accessing the directory will see the given contents .
pub async fn read_only_directory(
        &self,
        directory_name: impl Into<String>,
        to: Vec<impl Into<Ref>>,
        directory_contents: DirectoryContents,
    ) -> Result<(), Error> {
        let to: Vec<Ref> = to.into_iter().map(|t| t.into()).collect();
        for target in &to {
            target.check_scope(&self.realm_path)?;
        }
        let mut to = to.into_iter().map(Into::into).collect::<Vec<_>>();
        let fut = self.realm_proxy.read_only_directory(
            &directory_name.into(),
            &mut to.iter_mut(),
            &mut directory_contents.into(),
        );
        fut.await??;
        Ok(())
    }
pub async fn read_only_directory ( & self , directory_name : impl Into < String > , to : Vec < impl Into < Ref > > , directory_contents : DirectoryContents , ) -> Result < ( ) , Error > { let to : Vec < Ref > = to . into_iter ( ) . map ( | t | t . into ( ) ) . collect ( ) ; for target in & to { target . check_scope ( & self . realm_path ) ? ; } let mut to = to . into_iter ( ) . map ( Into :: into ) . collect :: < Vec < _ > > ( ) ; let fut = self . realm_proxy . read_only_directory ( & directory_name . into ( ) , & mut to . iter_mut ( ) , & mut directory_contents . into ( ) , ) ; fut . await ? ? ; Ok ( ( ) ) }
Creates and routes a read-only directory capability to the given targets.
Creates and routes a read - only directory capability to the given targets .
&self
directory_name
impl Into<String>
to
Vec<impl Into<Ref>>
directory_contents
DirectoryContents