2.9 KiB
2.9 KiB
zcash-android-wallet-sdk / cash.z.ecc.android.sdk.ext / Twig
Twig
interface Twig
A tiny log.
Functions
| Name | Summary |
|---|---|
| plus | open operator fun plus(twig: Twig): Twig |
| twig | abstract fun twig(logMessage: String= ""):Unit |
Companion Object Functions
| Name | Summary |
|---|---|
| clip | fun clip(leaf: Leaf): BooleanClip a leaf from the bush. Clipped leaves no longer appear in logs. |
| plant | fun plant(rootTwig: Twig): UnitPlants the twig, making it the one and only bush. Twigs can be bundled together to create the appearance of multiple bushes (i.e Twig.plant(twigA + twigB + twigC)) even though there's only ever one bush. |
| prune | fun prune(): UnitClip all leaves from the bush. |
| sprout | fun sprout(leaf: Leaf): BooleanGenerate a leaf on the bush. Leaves show up in every log message as tags until they are clipped. |
Extension Functions
| Name | Summary |
|---|---|
| twig | fun <R> Twig.twig(logMessage: String, block: () -> R): RTimes a tiny log. Execute the block of code on the clock. |
| twigTask | fun <R> Twig.twigTask(logMessage: String, block: () -> R): RA tiny log task. Execute the block of code with some twigging around the outside. For silent twigs, this adds a small amount of overhead at the call site but still avoids logging. |
Inheritors
| Name | Summary |
|---|---|
| CompositeTwig | open class CompositeTwig : TwigSince there can only ever be one trunk on the bush of twigs, this class lets you cheat and make that trunk be a bundle of twigs. |
| SilentTwig | class SilentTwig : TwigA tiny log that does nothing. No one hears this twig fall in the woods. |
| TroubleshootingTwig | open class TroubleshootingTwig : TwigA tiny log for detecting troubles. Aim at your troubles and pull the twigger. |