| // generated by diplomat-tool |
| |
| part of 'lib.g.dart'; |
| |
| final class _IsoTimeZoneOptionsFfi extends ffi.Struct { |
| @ffi.Int32() |
| external int format; |
| @ffi.Int32() |
| external int minutes; |
| @ffi.Int32() |
| external int seconds; |
| } |
| |
| final class IsoTimeZoneOptions { |
| IsoTimeZoneFormat format; |
| IsoTimeZoneMinuteDisplay minutes; |
| IsoTimeZoneSecondDisplay seconds; |
| |
| IsoTimeZoneOptions( |
| {required this.format, required this.minutes, required this.seconds}); |
| |
| // This struct contains borrowed fields, so this takes in a list of |
| // "edges" corresponding to where each lifetime's data may have been borrowed from |
| // and passes it down to individual fields containing the borrow. |
| // This method does not attempt to handle any dependencies between lifetimes, the caller |
| // should handle this when constructing edge arrays. |
| // ignore: unused_element |
| IsoTimeZoneOptions._fromFfi(_IsoTimeZoneOptionsFfi ffi) |
| : format = IsoTimeZoneFormat.values[ffi.format], |
| minutes = IsoTimeZoneMinuteDisplay.values[ffi.minutes], |
| seconds = IsoTimeZoneSecondDisplay.values[ffi.seconds]; |
| |
| // ignore: unused_element |
| _IsoTimeZoneOptionsFfi _toFfi(ffi.Allocator temp) { |
| final struct = ffi.Struct.create<_IsoTimeZoneOptionsFfi>(); |
| struct.format = format.index; |
| struct.minutes = minutes.index; |
| struct.seconds = seconds.index; |
| return struct; |
| } |
| |
| @override |
| bool operator ==(Object other) => |
| other is IsoTimeZoneOptions && |
| other.format == format && |
| other.minutes == minutes && |
| other.seconds == seconds; |
| |
| @override |
| int get hashCode => Object.hashAll([ |
| format, |
| minutes, |
| seconds, |
| ]); |
| } |