pub struct Fabric {
pub id: u64,
pub ipk_epoch_key: Vec<u8>,
pub ca_id: u64,
/* private fields */
}Fields§
§id: u64§ipk_epoch_key: Vec<u8>§ca_id: u64Implementations§
Source§impl Fabric
impl Fabric
Sourcepub fn new(
fabric_id: u64,
ca_id: u64,
ca_public_key: &[u8],
ipk_epoch_key: &[u8],
) -> Self
pub fn new( fabric_id: u64, ca_id: u64, ca_public_key: &[u8], ipk_epoch_key: &[u8], ) -> Self
Create a new Fabric.
ipk_epoch_key is the 16-byte IPK epoch key for this fabric. On the controller side it
should come from [certmanager::CertManager::get_ipk_epoch_key] (generated at bootstrap
and persisted in metadata.json). On the device side it is supplied by the controller
via AddNOC and stored in FabricInfo.ipk.
Sourcepub fn compressed(&self) -> Result<Vec<u8>>
pub fn compressed(&self) -> Result<Vec<u8>>
Compressed fabric identifier
Sourcepub fn signed_ipk(&self) -> Result<Vec<u8>>
pub fn signed_ipk(&self) -> Result<Vec<u8>>
Integrity Protection Key
Auto Trait Implementations§
impl Freeze for Fabric
impl RefUnwindSafe for Fabric
impl Send for Fabric
impl Sync for Fabric
impl Unpin for Fabric
impl UnsafeUnpin for Fabric
impl UnwindSafe for Fabric
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