forked from rust-random/getrandom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextern_item_impls.rs
More file actions
19 lines (16 loc) · 831 Bytes
/
extern_item_impls.rs
File metadata and controls
19 lines (16 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//! An implementation which calls out to an externally defined function.
use crate::Error;
use core::mem::MaybeUninit;
/// Declares this function as an external implementation of [`fill_uninit`](crate::fill_uninit).
#[cfg_attr(getrandom_backend = "extern_item_impls", eii(fill_uninit))]
pub(crate) fn fill_inner(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error>;
/// Declares this function as an external implementation of [`u32`](crate::u32).
#[cfg_attr(getrandom_backend = "extern_item_impls", eii(u32))]
pub(crate) fn inner_u32() -> Result<u32, crate::Error> {
crate::util::inner_u32()
}
/// Declares this function as an external implementation of [`u64`](crate::u64).
#[cfg_attr(getrandom_backend = "extern_item_impls", eii(u64))]
pub(crate) fn inner_u64() -> Result<u64, crate::Error> {
crate::util::inner_u64()
}