Enum spirit::fragment::driver::Instruction [−][src]
pub enum Instruction<Resource> {
DropAll,
DropSpecific(CacheId),
Install {
id: CacheId,
resource: Resource,
},
}
Expand description
Variants
Instruction for the Pipeline
to remove all active resources
produced by this driver.
This is legal to use even in cases when the set of active resources is empty (this drops nothing) or if the resources are not uniquely separately identifiable.
DropSpecific(CacheId)
Instruction for the Pipeline
to remove a specific resource.
It is a contract violation if this ID doesn’t correspond to exactly one active resource and
the Pipeline
may panic or misbehave under such circumstances. Specifically, it is not
allowed to refer to resource that is no longer active (was dropped previously), never
existed or to use a non-unique ID here.
Tuple Fields of DropSpecific
0: CacheId
Installs another resource.
The resource is identified with an id
, so it can be referenced in the future. It is
allowed to reuse a no longer used ID. It is not allowed to produce non-unique IDs for
active resources.