flutter_rust_bridge 2.12.0

Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// Copied from `ouroboros`: https://github.com/someguynamedjosh/ouroboros/blob/7316c75b988ce97140c824837253161bc411eb22/ouroboros/src/lib.rs#L391
///
/// # Safety
///
/// Please refer to their doc
pub unsafe fn ouroboros_change_lifetime<'old, 'new: 'old, T: 'new>(data: &'old T) -> &'new T {
    &*(data as *const _)
}

/// # Safety
///
/// Please refer to `change_lifetime`
pub unsafe fn ouroboros_change_lifetime_mut<'old, 'new: 'old, T: 'new>(
    data: &'old mut T,
) -> &'new mut T {
    &mut *(data as *mut _)
}