Search Results for

    Show / Hide Table of Contents

    Struct IOResult

    Holds a result of an IO operation.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Akka.Streams.IO
    Assembly: Akka.Streams.dll
    Syntax
    public readonly struct IOResult

    Constructors

    | Edit this page View Source

    IOResult(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 Source

    Count

    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 Source

    Error

    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

    | Edit this page View Source

    WasSuccessful

    Indicates whether IO operation completed successfully or not.

    Declaration
    public bool WasSuccessful { get; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    Failed(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

    | Edit this page View Source

    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

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET