pub struct ConnectOutcome {
pub status: NetworkStatus,
pub error_value: Option<i32>,
}Expand description
What a ConnectNetwork attempt produced (§11.9.7.9).
Fields§
§status: NetworkStatusNetworkingStatus [0].
error_value: Option<i32>ErrorValue [2] — nullable, and null on success.
For Wi-Fi, §11.9.7.9 is specific: “the ErrorValue field SHALL be set to the Status Code value that was present in the last frame related to association where Status Code was not equal to zero” — an IEEE 802.11-2020 Table 9-50 code, which a diagnostic tool can name. Otherwise it is “an implementation-dependent value”.
Implementations§
Source§impl ConnectOutcome
impl ConnectOutcome
Sourcepub const fn success() -> Self
pub const fn success() -> Self
A successful connection: Success, and a null ErrorValue.
§11.9.7.9: “Set the LastConnectErrorValue attribute value to the ErrorValue matching the response, including setting it to null if the ErrorValue is not applicable.”
Sourcepub const fn failed(status: NetworkStatus) -> Self
pub const fn failed(status: NetworkStatus) -> Self
A failure with no further detail.
Sourcepub const fn failed_with(status: NetworkStatus, error_value: i32) -> Self
pub const fn failed_with(status: NetworkStatus, error_value: i32) -> Self
A failure carrying an implementation or 802.11 status code.