fabricatio_typst.models.generic
base classes for all research components.
Classes
Class that provides a reference to another object. |
|
Class that provides a method to introspect the object. |
Module Contents
- class fabricatio_typst.models.generic.WithRef[T](/, **data: Any)
Bases:
fabricatio_core.models.generic.Base,abc.ABCClass that provides a reference to another object.
This class manages a reference to another object, allowing for easy access and updates.
- property referenced: T
Get the referenced object.
- Returns:
The referenced object.
- Return type:
T
- Raises:
ValueError – If the reference is not set.
- update_ref[S: WithRef](reference: T) S
- update_ref(reference: WithRef[T]) S
- update_ref(reference: None = None) S
Update the reference of the object.
- Parameters:
reference (Union[T, WithRef[T], None]) – The new reference to set.
- Returns:
The current instance with the updated reference.
- Return type:
S