FsPolicy.optional_directory_result: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/FsPolicy.bend as FsPolicy Lines 11-26 of mylsm-lsm-store@0.6.0.1/src/FsPolicy.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/FsPolicy.bend&start_line=11&end_line=26 import Base # Ignores absent optional levels and preserves other errors. def optional_directory_result( optional: Bool, unavailable: Bool, +code: U32, message: String ) -> Result<&1, &1, U32 & String, Unit>: match optional: case False{}: Fail{(code, message)} case True{}: match unavailable: case True{}: Done{Unit{}} case False{}: Fail{(code, message)} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit