Contents

content(forType:)

Retrieves a suggestion’s contents by returning a structure specific to the given content type.

Declaration

func content<Content>(forType content: Content.Type) async throws -> Content? where Content : JournalingSuggestionAsset

Parameters

Return Value

An instance of the requested type, if it exists in the suggestion.

Discussion

The framework templates this method, where Content is JournalingSuggestionAsset, because the content argument is a Type rather than an enumeration case, or other primitive.

See Also

Accessing suggestion data by type