BlobDescriptor class

Metadata describing a blob stored in a BlossomCache.

The shape mirrors the descriptor returned by Blossom servers (BUD-02), so it can be serialized over a protocol boundary if needed.

Constructors

BlobDescriptor({required String sha256, required int size, required DateTime uploadedAt, DateTime? lastAccessedAt, String? type, bool pinned = false})

Properties

hashCode → int
The hash code for this object.
no setteroverride
lastAccessedAt → DateTime
When the blob was last read via BlossomCache.get. Equal to uploadedAt for blobs that have never been read. Not updated by BlossomCache.head, BlossomCache.pin, or BlossomCache.unpin.
final
pinned → bool
When true, automatic eviction (e.g. by BoundedBlossomCache) must skip this blob. Manual BlossomCache.delete still works regardless.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sha256 → String
The sha256 of the blob's bytes, lowercase hex.
final
size → int
Size of the blob in bytes.
final
type → String?
MIME type, if known.
final
uploadedAt → DateTime
When the blob was added to the cache.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
JSON shape compatible with Blossom protocol responses. The accessed field is a local extension and not part of the standard Blossom spec.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override