GRPC Objective-C  1.71.0
Class Methods
GRXWriter(Immediate) Category Reference

#import <GRXWriter+Immediate.h>

Class Methods

(instancetype) + writerWithEnumerator:
 Returns a writer that pulls values from the passed NSEnumerator instance and pushes them to its writeable. More...
 
(instancetype) + writerWithValueSupplier:
 Returns a writer that pushes to its writeable the successive values returned by the passed block. More...
 
(instancetype) + writerWithContainer:
 Returns a writer that iterates over the values of the passed container and pushes them to its writeable. More...
 
(instancetype) + writerWithValue:
 Returns a writer that sends the passed value to its writeable and then finishes (releasing the value). More...
 
(instancetype) + writerWithError:
 Returns a writer that, as part of its start method, sends the passed error to the writeable (then releasing the error). More...
 
(instancetype) + emptyWriter
 Returns a writer that, as part of its start method, finishes immediately without sending any values to its writeable. More...
 

Method Documentation

◆ emptyWriter

+ (instancetype) emptyWriter

Returns a writer that, as part of its start method, finishes immediately without sending any values to its writeable.

Extends class GRXWriter.

◆ writerWithContainer:

+ (instancetype) writerWithContainer: (id< NSFastEnumeration >)  container

Returns a writer that iterates over the values of the passed container and pushes them to its writeable.

The container is released when the iteration is over.

Note that the usual speed gain of NSFastEnumeration over NSEnumerator results from not having to call one method per element. Because GRXWriteable instances accept values one by one, that speed gain doesn't happen here.

Extends class GRXWriter.

◆ writerWithEnumerator:

+ (instancetype) writerWithEnumerator: (NSEnumerator *)  enumerator

Returns a writer that pulls values from the passed NSEnumerator instance and pushes them to its writeable.

The NSEnumerator is released when it finishes.

Extends class GRXWriter.

◆ writerWithError:

+ (instancetype) writerWithError: (NSError *)  error

Returns a writer that, as part of its start method, sends the passed error to the writeable (then releasing the error).

Extends class GRXWriter.

◆ writerWithValue:

+ (instancetype) writerWithValue: (id)  value

Returns a writer that sends the passed value to its writeable and then finishes (releasing the value).

Extends class GRXWriter.

◆ writerWithValueSupplier:

+ (instancetype) writerWithValueSupplier: (id(^)(void))  block

Returns a writer that pushes to its writeable the successive values returned by the passed block.

When the block first returns nil, it is released.

Extends class GRXWriter.


The documentation for this category was generated from the following file: