diff --git a/ctru-rs/src/services/ps.rs b/ctru-rs/src/services/ps.rs index a20e47e..5e9adfa 100644 --- a/ctru-rs/src/services/ps.rs +++ b/ctru-rs/src/services/ps.rs @@ -1,7 +1,15 @@ +//! Process Services (PS) module. This is used for miscellaneous utility tasks, but +//! is particularly important because it is used to generate random data, which +//! is required for common things like [`HashMap`](std::collections::HashMap). +//! See also + +/// PS handle. This must not be dropped in order for random generation +/// to work (in most cases, the lifetime of an application). #[non_exhaustive] pub struct Ps; impl Ps { + /// Initialize the PS module. pub fn init() -> crate::Result { let r = unsafe { ctru_sys::psInit() }; if r < 0 {