pub fn from_code_data_and_library<T>(
        code: &mut T,
        data: Option<&mut T>,
        library: Option<&mut T>,
    ) -> Result<Self>
    where
        T: Read + Seek,
    {
        let mut state_init = StateInit::default();

        state_init.set_code(deserialize_tree_of_cells(code)?);

        if let Some(data) = data {
            state_init.set_data(deserialize_tree_of_cells(data)?);
        }

        if let Some(library) = library {
            state_init.set_library(deserialize_tree_of_cells(library)?);
        }

        let id = AccountId::from(state_init.hash()?);

        Ok(Self { state_init, id })
    }
// Creating contract image from code data and library bags of cells
Creating contract image from code data and library bags of cells
Creating contract image from code data and library bags of cells
pub fn from_code_data_and_library<T>(
        code: &mut T,
        data: Option<&mut T>,
        library: Option<&mut T>,
    ) -> Result<Self>
    where
        T: Read + Seek,
    {
        let mut state_init = StateInit::default();
        state_init.set_code(deserialize_tree_of_cells(code)?);
        if let Some(data) = data {
            state_init.set_data(deserialize_tree_of_cells(data)?);
        }
        if let Some(library) = library {
            state_init.set_library(deserialize_tree_of_cells(library)?);
        }
        let id = AccountId::from(state_init.hash()?);
        Ok(Self { state_init, id })
    }
pub fn from_code_data_and_library < T > ( code : & mut T , data : Option < & mut T > , library : Option < & mut T > , ) -> Result < Self > where T : Read + Seek , { let mut state_init = StateInit :: default ( ) ; state_init . set_code ( deserialize_tree_of_cells ( code ) ? ) ; if let Some ( data ) = data { state_init . set_data ( deserialize_tree_of_cells ( data ) ? ) ; } if let Some ( library ) = library { state_init . set_library ( deserialize_tree_of_cells ( library ) ? ) ; } let id = AccountId :: from ( state_init . hash ( ) ? ) ; Ok ( Self { state_init , id } ) }
Creating contract image from code data and library bags of cells
Creating contract image from code data and library bags of cells
code
&mut T
data
Option<&mut T>
library
Option<&mut T>