Skip to main content

Module success

Module success 

Source
👎Deprecated since 0.0.6:

libyml is unmaintained. Migrate to a maintained alternative (unsafe-libyaml, yaml-rust2, or noyalib). See MIGRATION.md.

Expand description

Success/failure helpers retained for source compatibility with libyml ≤ 0.0.5.

Migration note. The upstream unsafe-libyaml crate keeps its Success / Failure structs in a private module — the values flow out of yaml_* calls but cannot be named at a path. The previous libyml::success::Success type therefore has no nameable equivalent in the shim; the public helpers below accept bool so they can still chain with the upstream return values via .ok.

Old:

use libyml::success::is_success;
if is_success(yaml_parser_initialize(p)) { /* … */ }

New:

use libyml::success::is_success;
if is_success(yaml_parser_initialize(p).ok) { /* … */ }

Functions§

is_failureDeprecated
Returns true when the operation failed.
is_successDeprecated
Returns true when the operation was successful.