| // generated by diplomat-tool |
| |
| part of 'lib.g.dart'; |
| |
| final class _WeekOfFfi extends ffi.Struct { |
| @ffi.Uint16() |
| external int week; |
| @ffi.Int32() |
| external int unit; |
| } |
| |
| /// See the [Rust documentation for `WeekOf`](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekOf.html) for more information. |
| final class WeekOf { |
| final int week; |
| final WeekRelativeUnit unit; |
| |
| // 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 |
| WeekOf._fromFfi(_WeekOfFfi ffi) |
| : week = ffi.week, |
| unit = WeekRelativeUnit.values[ffi.unit]; |
| |
| // ignore: unused_element |
| _WeekOfFfi _toFfi(ffi.Allocator temp) { |
| final struct = ffi.Struct.create<_WeekOfFfi>(); |
| struct.week = week; |
| struct.unit = unit.index; |
| return struct; |
| } |
| |
| @override |
| bool operator ==(Object other) => |
| other is WeekOf && other.week == week && other.unit == unit; |
| |
| @override |
| int get hashCode => Object.hashAll([week, unit]); |
| } |