| 98 | |
| 99 | impl From<&SessionConfig> for FFI_SessionConfig { |
| 100 | fn from(session: &SessionConfig) -> Self { |
| 101 | let private_data = Box::new(SessionConfigPrivateData { |
| 102 | config: session.clone(), |
| 103 | }); |
| 104 | |
| 105 | let config_options = FFI_ConfigOptions::from(session.options().as_ref()); |
| 106 | |
| 107 | Self { |
| 108 | config_options, |
| 109 | private_data: Box::into_raw(private_data) as *mut c_void, |
| 110 | clone: clone_fn_wrapper, |
| 111 | release: release_fn_wrapper, |
| 112 | library_marker_id: crate::get_library_marker_id, |
| 113 | } |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | impl Clone for FFI_SessionConfig { |