//
//  SBResult.h
//  SwitchboardSDK
//
//  Created by Balazs Kiss on 2025. 07. 03..
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface SBResult<__covariant T> : NSObject

@property (nonatomic, readonly) BOOL success;
@property (nonatomic, readonly, nullable) T value;
@property (nonatomic, readonly, nullable) NSError* error;

+ (instancetype)successWithValue:(nullable T)value;
+ (instancetype)failureWithError:(NSError*)error;

@end

NS_ASSUME_NONNULL_END
