create

suspend fun create(documentId: String, serializedData: ByteString?, saveFn: suspend (data: ByteString) -> Unit): DocumentMetadata

The factory for DocumentMetadata.

Return

the created DocumentMetadata

Parameters

documentId

the document to create metadata for.

serializedData

the serialized metadata.

saveFn

a function to serialize the instance into serialized metadata.