Documentation ¶
Index ¶
- type Shielded
- func (instance *Shielded) Alter(alterer func(data.Clonable) fail.Error) (ferr fail.Error)
- func (instance *Shielded) Clone() (*Shielded, error)
- func (instance *Shielded) Deserialize(buf []byte) (ferr fail.Error)
- func (instance *Shielded) Inspect(inspector func(clonable data.Clonable) fail.Error) (ferr fail.Error)
- func (instance *Shielded) IsNull() bool
- func (instance *Shielded) Sdump() (string, error)
- func (instance *Shielded) Serialize() (_ []byte, ferr fail.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Shielded ¶
type Shielded struct {
// contains filtered or unexported fields
}
Shielded allows to store data with controlled access to it
func NewShielded ¶
NewShielded creates a new protected data from a cloned witness
func (*Shielded) Alter ¶
Alter allows to update a cloneable using a write lock 'alterer' can use a special error to tell the outside there was no change : fail.ErrAlteredNothing, which can be generated with fail.AlteredNothingError(). The caller of the Alter() method will then be able to known, when an error occurs, if it's because there was no change.
func (*Shielded) Deserialize ¶
Deserialize transforms serialization data to valid content of Shielded instance Note: doesn't follow interface data.Serializable (task parameter not used in it)
func (*Shielded) Inspect ¶
func (instance *Shielded) Inspect(inspector func(clonable data.Clonable) fail.Error) (ferr fail.Error)
Inspect is used to lock a clonable for read