pub fn render(self) -> SgdOpResult<RenderedOps> {
        let Self {
            creates,
            deletes,
            updates,
            entry,
        } = self;
        match entry {
            Some(EntryData { entry, entry_type }) => {
                let mut ops = Vec::with_capacity(creates.len() + deletes.len() + updates.len());
                let entry_hashed = EntryHashed::from_content_sync(entry);
                for op in creates {
                    let status = op.validation_status();
                    let SignedHeader(header, signature) = op
                        .data
                        .into_signed_header(entry_type.clone(), entry_hashed.as_hash().clone());

                    ops.push(RenderedOp::new(
                        header,
                        signature,
                        status,
                        SgdOpType::StoreEntry,
                    )?);
                }
                for op in deletes {
                    let status = op.validation_status();
                    let op = op.data;
                    let signature = op.signature;
                    let header = Header::Delete(op.delete);

                    ops.push(RenderedOp::new(
                        header,
                        signature,
                        status,
                        SgdOpType::RegisterDeletedEntryHeader,
                    )?);
                }
                for op in updates {
                    let status = op.validation_status();
                    let SignedHeader(header, signature) =
                        op.data.into_signed_header(entry_hashed.as_hash().clone());

                    ops.push(RenderedOp::new(
                        header,
                        signature,
                        status,
                        SgdOpType::RegisterUpdatedContent,
                    )?);
                }
                Ok(RenderedOps {
                    entry: Some(entry_hashed),
                    ops,
                })
            }
            None => Ok(Default::default()),
        }
    }
/// Render these ops to their full types.
Render these ops to their full types.
Render these ops to their full types .
pub fn render(self) -> SgdOpResult<RenderedOps> {
        let Self {
            creates,
            deletes,
            updates,
            entry,
        } = self;
        match entry {
            Some(EntryData { entry, entry_type }) => {
                let mut ops = Vec::with_capacity(creates.len() + deletes.len() + updates.len());
                let entry_hashed = EntryHashed::from_content_sync(entry);
                for op in creates {
                    let status = op.validation_status();
                    let SignedHeader(header, signature) = op
                        .data
                        .into_signed_header(entry_type.clone(), entry_hashed.as_hash().clone());
                    ops.push(RenderedOp::new(
                        header,
                        signature,
                        status,
                        SgdOpType::StoreEntry,
                    )?);
                }
                for op in deletes {
                    let status = op.validation_status();
                    let op = op.data;
                    let signature = op.signature;
                    let header = Header::Delete(op.delete);
                    ops.push(RenderedOp::new(
                        header,
                        signature,
                        status,
                        SgdOpType::RegisterDeletedEntryHeader,
                    )?);
                }
                for op in updates {
                    let status = op.validation_status();
                    let SignedHeader(header, signature) =
                        op.data.into_signed_header(entry_hashed.as_hash().clone());
                    ops.push(RenderedOp::new(
                        header,
                        signature,
                        status,
                        SgdOpType::RegisterUpdatedContent,
                    )?);
                }
                Ok(RenderedOps {
                    entry: Some(entry_hashed),
                    ops,
                })
            }
            None => Ok(Default::default()),
        }
    }
pub fn render ( self ) -> SgdOpResult < RenderedOps > { let Self { creates , deletes , updates , entry , } = self ; match entry { Some ( EntryData { entry , entry_type } ) => { let mut ops = Vec :: with_capacity ( creates . len ( ) + deletes . len ( ) + updates . len ( ) ) ; let entry_hashed = EntryHashed :: from_content_sync ( entry ) ; for op in creates { let status = op . validation_status ( ) ; let SignedHeader ( header , signature ) = op . data . into_signed_header ( entry_type . clone ( ) , entry_hashed . as_hash ( ) . clone ( ) ) ; ops . push ( RenderedOp :: new ( header , signature , status , SgdOpType :: StoreEntry , ) ? ) ; } for op in deletes { let status = op . validation_status ( ) ; let op = op . data ; let signature = op . signature ; let header = Header :: Delete ( op . delete ) ; ops . push ( RenderedOp :: new ( header , signature , status , SgdOpType :: RegisterDeletedEntryHeader , ) ? ) ; } for op in updates { let status = op . validation_status ( ) ; let SignedHeader ( header , signature ) = op . data . into_signed_header ( entry_hashed . as_hash ( ) . clone ( ) ) ; ops . push ( RenderedOp :: new ( header , signature , status , SgdOpType :: RegisterUpdatedContent , ) ? ) ; } Ok ( RenderedOps { entry : Some ( entry_hashed ) , ops , } ) } None => Ok ( Default :: default ( ) ) , } }
Render these ops to their full types.
Render these ops to their full types .
self
self