v0.29.0-alpha (November 18th, 2021) Pre-release
Pre-release
Pre-release
Breaking Changes
Several breaking changes around aws_smithy_types::Instant were introduced by smithy-rs#849:
aws_smithy_types::Instantfrom was renamed toDateTimeto avoid confusion with the standard library's monotonically nondecreasingInstanttype.DateParseErrorinaws_smithy_typeshas been renamed toDateTimeParseErrorto match the type that's being parsed.- The
chrono-conversionsfeature and associated functions have been moved to theaws-smithy-types-convertcrate.- Calls to
Instant::from_chronoshould be changed to:use aws_smithy_types::DateTime; use aws_smithy_types_convert::date_time::DateTimeExt; // For chrono::DateTime<Utc> let date_time = DateTime::from_chrono_utc(chrono_date_time); // For chrono::DateTime<FixedOffset> let date_time = DateTime::from_chrono_offset(chrono_date_time);
- Calls to
instant.to_chrono()should be changed to:use aws_smithy_types_convert::date_time::DateTimeExt; date_time.to_chrono_utc();
- Calls to
Instant::from_system_timeandInstant::to_system_timehave been changed toFromtrait implementations.- Calls to
from_system_timeshould be changed to:DateTime::from(system_time); // or let date_time: DateTime = system_time.into();
- Calls to
to_system_timeshould be changed to:SystemTime::from(date_time); // or let system_time: SystemTime = date_time.into();
- Calls to
- Several functions in
Instant/DateTimewere renamed:Instant::from_f64->DateTime::from_secs_f64Instant::from_fractional_seconds->DateTime::from_fractional_secsInstant::from_epoch_seconds->DateTime::from_secsInstant::from_epoch_millis->DateTime::from_millisInstant::epoch_fractional_seconds->DateTime::as_secs_f64Instant::has_nanos->DateTime::has_subsec_nanosInstant::epoch_seconds->DateTime::secsInstant::epoch_subsecond_nanos->DateTime::subsec_nanosInstant::to_epoch_millis->DateTime::to_millis
- The
DateTime::fmtmethod is now fallible and fails when aDateTime's value is outside what can be represented by the desired date format. - In
aws-sigv4, theSigningParamsbuilder'sdate_timesetter was renamed totimeand changed to take astd::time::SystemTimeinstead of a chrono'sDateTime<Utc>.
New this week
⚠️ MSRV increased from 1.53.0 to 1.54.0 per our 3-behind MSRV policy.- Conversions from
aws_smithy_types::DateTimetoOffsetDateTimefrom thetimecrate are now available from theaws-smithy-types-convertcrate. (smithy-rs#849) - Fixed links to Usage Examples (smithy-rs#862, @floric)