1+ // Re-export CXX Exception type to simplify usage
2+ pub use cxx:: Exception ;
13use cxx:: UniquePtr ;
24
35#[ cxx:: bridge( namespace = "FastPForLib" ) ]
@@ -84,7 +86,7 @@ pub trait Codec32: CodecWrapper {
8486 & self ,
8587 input : & [ u32 ] ,
8688 output : & ' out mut [ u32 ] ,
87- ) -> Result < & ' out mut [ u32 ] , cxx :: Exception > {
89+ ) -> Result < & ' out mut [ u32 ] , Exception > {
8890 let n = ffi:: codec_encode32 ( self . codec ( ) , input, output) ?;
8991 Ok ( & mut output[ ..n] )
9092 }
@@ -94,7 +96,7 @@ pub trait Codec32: CodecWrapper {
9496 & self ,
9597 input : & [ u32 ] ,
9698 output : & ' out mut [ u32 ] ,
97- ) -> Result < & ' out mut [ u32 ] , cxx :: Exception > {
99+ ) -> Result < & ' out mut [ u32 ] , Exception > {
98100 let n = ffi:: codec_decode32 ( self . codec ( ) , input, output) ?;
99101 Ok ( & mut output[ ..n] )
100102 }
@@ -107,7 +109,7 @@ pub trait Codec64: CodecWrapper {
107109 & self ,
108110 input : & [ u64 ] ,
109111 output : & ' out mut [ u32 ] ,
110- ) -> Result < & ' out mut [ u32 ] , cxx :: Exception > {
112+ ) -> Result < & ' out mut [ u32 ] , Exception > {
111113 let n = ffi:: codec_encode64 ( self . codec ( ) , input, output) ?;
112114 Ok ( & mut output[ ..n] )
113115 }
@@ -117,7 +119,7 @@ pub trait Codec64: CodecWrapper {
117119 & self ,
118120 input : & [ u32 ] ,
119121 output : & ' out mut [ u64 ] ,
120- ) -> Result < & ' out mut [ u64 ] , cxx :: Exception > {
122+ ) -> Result < & ' out mut [ u64 ] , Exception > {
121123 let n = ffi:: codec_decode64 ( self . codec ( ) , input, output) ?;
122124 Ok ( & mut output[ ..n] )
123125 }
0 commit comments