pub struct PrimitiveContext { /* private fields */ }Expand description
A simplistic owned primitive context
This is very simplistic in two ways:
-
While the context is self-referential in principle, it makes use of the known and simple linking structure, and fixes itself every time it is used.
-
It is only used through exclusive access, whereas actually a context might be used at the same time in different ways (once exclusively, many times shared, and unlike references they don’t conflict)
Implementations§
Source§impl PrimitiveContext
impl PrimitiveContext
Sourcepub fn new_from_fresh_material(immutables: PrimitiveImmutables) -> Self
pub fn new_from_fresh_material(immutables: PrimitiveImmutables) -> Self
Create a new security context
§Security
The material in the immutables must never have been used before. For example, it may be
material that has just been produced from an ACE OSCORE exchange to which this device
contributed entropy.
pub fn as_mut(&mut self) -> &mut oscore_context_t
pub fn recipient_id(&self) -> &[u8]
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrimitiveContext
impl RefUnwindSafe for PrimitiveContext
impl !Send for PrimitiveContext
impl !Sync for PrimitiveContext
impl Unpin for PrimitiveContext
impl UnsafeUnpin for PrimitiveContext
impl UnwindSafe for PrimitiveContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more