Struct rubble::link::queue::Consume[][src]

pub struct Consume<T> {
    should_consume: bool,
    result: Result<T, Error>,
}
Expand description

Bundles a T along with information telling a queue whether to consume a packet.

Fields

should_consume: boolresult: Result<T, Error>

Implementations

Consume the currently processed packet iff consume is true, then return result.

Consume the currently processed packet, then return result.

Do not consume the currently processed packet, then return result.

The next call to the Consumer::consume_* methods will yield the same packet again.

Consume the currently processed packet if result indicates success, then return the result.

Retrieves whether the packet should be removed from the queue.

Retrieves a reference to the inner result.

Unwraps this consume, retrieving the inner result.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.