dope_sys/ring/create/primary.rs
1use crate::memory;
2
3/// The exact construction failure survives every later cleanup attempt.
4#[derive(Debug, Clone, Copy, PartialEq, Eq)]
5pub enum Primary<M, R, B> {
6 Ring(M),
7 Memory(memory::Error),
8 Register(R),
9 Provided(B),
10}
11
12impl<M, R, B> From<memory::Error> for Primary<M, R, B> {
13 fn from(error: memory::Error) -> Self {
14 Self::Memory(error)
15 }
16}