pub(crate) fn generate_stream(config: &StreamConfig) -> Stream {
    let message = RequestBuilder::default()
        .sender(canister_test_id(SRC_CANISTER))
        .receiver(canister_test_id(DST_CANISTER))
        .method_name("test_method".to_string())
        .sender_reply_callback(CallbackId::from(CALLBACK_ID))
        .build();

    let mut messages = StreamIndexedQueue::with_begin(StreamIndex::from(config.message_begin));
    for _ in config.message_begin..config.message_end {
        messages.push(message.clone().into());
    }

    Stream::new(messages, config.signal_end.into())
}
/// Generates a stream based on the given configuration.
Generates a stream based on the given configuration.
Generates a stream based on the given configuration .
pub(crate) fn generate_stream(config: &StreamConfig) -> Stream {
    let message = RequestBuilder::default()
        .sender(canister_test_id(SRC_CANISTER))
        .receiver(canister_test_id(DST_CANISTER))
        .method_name("test_method".to_string())
        .sender_reply_callback(CallbackId::from(CALLBACK_ID))
        .build();
    let mut messages = StreamIndexedQueue::with_begin(StreamIndex::from(config.message_begin));
    for _ in config.message_begin..config.message_end {
        messages.push(message.clone().into());
    }
    Stream::new(messages, config.signal_end.into())
}
pub ( crate ) fn generate_stream ( config : & StreamConfig ) -> Stream { let message = RequestBuilder :: default ( ) . sender ( canister_test_id ( SRC_CANISTER ) ) . receiver ( canister_test_id ( DST_CANISTER ) ) . method_name ( " " . to_string ( ) ) . sender_reply_callback ( CallbackId :: from ( CALLBACK_ID ) ) . build ( ) ; let mut messages = StreamIndexedQueue :: with_begin ( StreamIndex :: from ( config . message_begin ) ) ; for _ in config . message_begin .. config . message_end { messages . push ( message . clone ( ) . into ( ) ) ; } Stream :: new ( messages , config . signal_end . into ( ) ) }
Generates a stream based on the given configuration.
Generates a stream based on the given configuration .
config
&StreamConfig
config
&StreamConfig