apply method

BaseLimit apply(
  1. BaseLimit other
)

Creates a new BaseLimit by applying values from other for any fields that are zero in this limit.

Implementation

BaseLimit apply(BaseLimit other) {
  return BaseLimit(
    streams: streams == 0 ? other.streams : streams,
    streamsInbound:
        streamsInbound == 0 ? other.streamsInbound : streamsInbound,
    streamsOutbound:
        streamsOutbound == 0 ? other.streamsOutbound : streamsOutbound,
    conns: conns == 0 ? other.conns : conns,
    connsInbound: connsInbound == 0 ? other.connsInbound : connsInbound,
    connsOutbound:
        connsOutbound == 0 ? other.connsOutbound : connsOutbound,
    fd: fd == 0 ? other.fd : fd,
    memory: memory == 0 ? other.memory : memory,
  );
}