pub struct PocBuilder { /* private fields */ }Expand description
Builder for creating PoC payloads.
Implementations§
Source§impl PocBuilder
impl PocBuilder
Sourcepub fn new(predecessor_cose_bytes: Vec<u8>) -> PocBuilder
pub fn new(predecessor_cose_bytes: Vec<u8>) -> PocBuilder
Creates a new builder with the predecessor PCA bytes.
Sourcepub fn ops(self, ops: Vec<String>) -> PocBuilder
pub fn ops(self, ops: Vec<String>) -> PocBuilder
Sets the requested operations (must be subset of predecessor).
Sourcepub fn executor(self, binding: DynamicMap) -> PocBuilder
pub fn executor(self, binding: DynamicMap) -> PocBuilder
Sets the next executor binding.
Sourcepub fn constraints(self, constraints: Constraints) -> PocBuilder
pub fn constraints(self, constraints: Constraints) -> PocBuilder
Sets the constraints.
Sourcepub fn attestation(
self,
attestation_type: impl Into<String>,
credential: Vec<u8>,
) -> PocBuilder
pub fn attestation( self, attestation_type: impl Into<String>, credential: Vec<u8>, ) -> PocBuilder
Adds an attestation without PoP.
Sourcepub fn attestation_with_pop(
self,
attestation_type: impl Into<String>,
credential: Vec<u8>,
pop: Vec<u8>,
) -> PocBuilder
pub fn attestation_with_pop( self, attestation_type: impl Into<String>, credential: Vec<u8>, pop: Vec<u8>, ) -> PocBuilder
Adds an attestation with PoP.
Sourcepub fn build(self) -> Result<PocPayload, &'static str>
pub fn build(self) -> Result<PocPayload, &'static str>
Builds the PoC payload, returning an error if required fields are missing.
Trait Implementations§
Source§impl Clone for PocBuilder
impl Clone for PocBuilder
Source§fn clone(&self) -> PocBuilder
fn clone(&self) -> PocBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PocBuilder
impl RefUnwindSafe for PocBuilder
impl Send for PocBuilder
impl Sync for PocBuilder
impl Unpin for PocBuilder
impl UnwindSafe for PocBuilder
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