/// Tries to read `len` bytes of the stable memory, starting from `offset`.
/// Panics if the read could not be performed.
Tries to read `len` bytes of the stable memory, starting from `offset`.
Panics if the read could not be performed.
Tries to read ` len ` bytes of the stable memory starting from ` offset ` . Panics if the read could not be performed .
pub async fn try_read_stable(&self, offset: u32, len: u32) -> Vec<u8> {
        self.agent
            .query(&self.canister_id, "query")
            .with_arg(
                universal_canister_argument_builder()
                    .stable_read(offset, len)
                    .reply_data_append()
                    .reply()
                    .build(),
            )
            .call()
            .await
            .unwrap_or_else(|err| {
                panic!("could not read message of len {} from stable: {}", len, err)
            })
    }
pub async fn try_read_stable ( & self , offset : u32 , len : u32 ) -> Vec < u8 > { self . agent . query ( & self . canister_id , " " ) . with_arg ( universal_canister_argument_builder ( ) . stable_read ( offset , len ) . reply_data_append ( ) . reply ( ) . build ( ) , ) . call ( ) . await . unwrap_or_else ( | err | { panic ! ( " " len err ) } ) }
Tries to read `len` bytes of the stable memory, starting from `offset`.
Tries to read ` len ` bytes of the stable memory starting from ` offset ` .
&self
offset
u32
len
u32