Struct IOResult
Holds a result of an IO operation.
Inherited Members
Namespace: Akka.Streams.IO
Assembly: Akka.Streams.dll
Syntax
public readonly struct IOResult
Constructors
| Edit this page View SourceIOResult(long, Result<NotUsed>)
Creates a new IOResult.
Declaration
public IOResult(long count, Result<NotUsed> status)
Parameters
| Type | Name | Description |
|---|---|---|
| long | count | Numeric value depending on context, for example IO operations performed or bytes processed. |
| Result<NotUsed> | status | Status of the result. Can be either NotUsed or an exception. |
Fields
| Edit this page View SourceCount
Numeric value depending on context, for example IO operations performed or bytes processed.
Declaration
public readonly long Count
Field Value
| Type | Description |
|---|---|
| long |
Properties
| Edit this page View SourceError
If the IO operation resulted in an error, returns the corresponding Exception or throws NotSupportedException otherwise.
Declaration
public Exception Error { get; }
Property Value
| Type | Description |
|---|---|
| Exception |
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | Is thrown if the property is accessed for a successful IOResult |
WasSuccessful
Indicates whether IO operation completed successfully or not.
Declaration
public bool WasSuccessful { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceFailed(long, Exception)
Creates failed IOResult, count should be the number of bytes (or other unit, please document in your APIs) processed before failing
Declaration
public static IOResult Failed(long count, Exception reason)
Parameters
| Type | Name | Description |
|---|---|---|
| long | count | Numeric value depending on context, for example IO operations performed or bytes processed. |
| Exception | reason | The corresponding Exception |
Returns
| Type | Description |
|---|---|
| IOResult | Failed IOResult |
Success(long)
Creates successful IOResult
Declaration
public static IOResult Success(long count)
Parameters
| Type | Name | Description |
|---|---|---|
| long | count | Numeric value depending on context, for example IO operations performed or bytes processed. |
Returns
| Type | Description |
|---|---|
| IOResult | Successful IOResult |
Edit this page