@@ -48,7 +48,7 @@ mod encryption;
4848// Our global variables needed by our library at runtime. Note that we follow Rust's
4949// safety rules here by making them immutable with write-exactly-once semantics using
5050// either Lazy or OnceCell.
51- static RT : OnceCell < Runtime > = OnceCell :: new ( ) ;
51+ pub static RT : OnceCell < Runtime > = OnceCell :: new ( ) ;
5252// A channel (i.e., a queue) where the GET/PUT requests from Julia are placed and where
5353// our dispatch task pulls requests.
5454static SQ : OnceCell < flume:: Sender < Request > > = OnceCell :: new ( ) ;
@@ -60,10 +60,10 @@ static CLIENTS: OnceCell<Cache<u64, Client>> = OnceCell::new();
6060// Contains configuration items that are set during initialization and do not change.
6161static STATIC_CONFIG : OnceCell < StaticConfig > = OnceCell :: new ( ) ;
6262
63- type ResultCallback = unsafe extern "C" fn ( task : * const c_void ) -> i32 ;
64- static RESULT_CB : OnceCell < ResultCallback > = OnceCell :: new ( ) ;
63+ pub type ResultCallback = unsafe extern "C" fn ( task : * const c_void ) -> i32 ;
64+ pub static RESULT_CB : OnceCell < ResultCallback > = OnceCell :: new ( ) ;
6565
66- type PanicCallback = unsafe extern "C" fn ( ) -> i32 ;
66+ pub type PanicCallback = unsafe extern "C" fn ( ) -> i32 ;
6767
6868fn runtime ( ) -> & ' static Runtime {
6969 RT . get ( ) . expect ( "start was not called" )
@@ -140,21 +140,21 @@ pub trait RawResponse {
140140 fn set_payload ( & mut self , payload : Option < Self :: Payload > ) ;
141141}
142142
143- struct ResponseGuard < T : RawResponse + ' static > {
143+ pub struct ResponseGuard < T : RawResponse + ' static > {
144144 response : & ' static mut T ,
145145 context : Arc < Context > ,
146146 handle : * const c_void
147147}
148148
149149impl < T : RawResponse > ResponseGuard < T > {
150- unsafe fn new ( response_ptr : * mut T , handle : * const c_void ) -> Self {
150+ pub unsafe fn new ( response_ptr : * mut T , handle : * const c_void ) -> Self {
151151 let response = unsafe { & mut ( * response_ptr) } ;
152152 * response. result_mut ( ) = CResult :: Uninitialized ;
153153 let context = Arc :: new ( Context :: default ( ) ) ;
154154 * response. context_mut ( ) = Arc :: into_raw ( context. clone ( ) ) ;
155155 ResponseGuard { response, context, handle }
156156 }
157- pub ( crate ) fn success ( self , payload : impl Into < T :: Payload > ) {
157+ pub fn success ( self , payload : impl Into < T :: Payload > ) {
158158 * self . response . result_mut ( ) = CResult :: Ok ;
159159 self . response . set_payload ( Some ( payload. into ( ) ) ) ;
160160 * self . response . error_message_mut ( ) = std:: ptr:: null_mut ( ) ;
@@ -715,7 +715,7 @@ export_runtime_op!(
715715 config: * const RawConfig
716716) ;
717717
718- trait NotifyGuard {
718+ pub trait NotifyGuard {
719719 fn is_uninitialized ( & mut self ) -> bool ;
720720 fn condition_handle ( & self ) -> * const c_void ;
721721 fn context ( & self ) -> & Context {
0 commit comments