matches method

  1. @override
bool matches(
  1. IPLDNode node
)
override

Whether the condition holds for node.

Implementation

@override
bool matches(IPLDNode node) {
  if (node.kind != Kind.LINK) return false;
  if (target == null) return true;
  final link = node.linkValue;
  return link.codec == target!.codec &&
      _bytesEqual(link.multihash, target!.multihash.toBytes());
}