Observable
@propertyWrapper
public final class Observable<T>
extension Observable: Encodable where T: Encodable
extension Observable: Decodable where T: Decodable
extension Observable: Equatable where T: Equatable
extension Observable: Hashable where T: Hashable
An observable describes a stateful value holder that notifies listeners whenever its state value has been changed.
-
Gets or sets the value being observed.
When setting, triggers listeners updating them of the new value.
Declaration
Swift
public var wrappedValue: T { get set }
-
Returns a publisher that can be subscribed in order to be notified of value changes.
Declaration
Swift
public var projectedValue: EventPublisher<T> { get }
-
Undocumented
Declaration
Swift
public init(wrappedValue: T)
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Declaration
Swift
public convenience init(from decoder: Decoder) throws
-
Declaration
Swift
public static func == (lhs: Observable, rhs: Observable) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)