pub trait ResultAdditionalSpecFns<T, E> {
// Required methods
spec fn is_Ok(&self) -> bool;
spec fn get_Ok_0(&self) -> T;
spec fn arrow_Ok_0(&self) -> T;
spec fn is_Err(&self) -> bool;
spec fn get_Err_0(&self) -> E;
spec fn arrow_Err_0(&self) -> E;
proof fn tracked_unwrap(tracked self) -> tracked t : T;
proof fn tracked_unwrap_err(tracked self) -> tracked t : E;
proof fn tracked_expect(tracked self, msg: &str) -> tracked t : T;
proof fn tracked_expect_err(tracked self, msg: &str) -> tracked t : E;
}Required Methods§
Sourcespec fn is_Ok(&self) -> bool
👎Deprecated: is_Variant is deprecated - use -> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.html
spec fn is_Ok(&self) -> bool
-> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.htmlSourcespec fn get_Ok_0(&self) -> T
👎Deprecated: get_Variant is deprecated - use -> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.html
spec fn get_Ok_0(&self) -> T
-> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.htmlSourcespec fn arrow_Ok_0(&self) -> T
spec fn arrow_Ok_0(&self) -> T
Sourcespec fn is_Err(&self) -> bool
👎Deprecated: is_Variant is deprecated - use -> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.html
spec fn is_Err(&self) -> bool
-> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.htmlSourcespec fn get_Err_0(&self) -> E
👎Deprecated: get_Variant is deprecated - use -> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.html
spec fn get_Err_0(&self) -> E
-> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.htmlSourcespec fn arrow_Err_0(&self) -> E
spec fn arrow_Err_0(&self) -> E
Sourceproof fn tracked_unwrap(tracked self) -> tracked t : T
proof fn tracked_unwrap(tracked self) -> tracked t : T
requires
self.is_Ok(),ensurest == self->Ok_0,Sourceproof fn tracked_unwrap_err(tracked self) -> tracked t : E
proof fn tracked_unwrap_err(tracked self) -> tracked t : E
requires
self.is_Err(),ensurest == self->Err_0,Sourceproof fn tracked_expect(tracked self, msg: &str) -> tracked t : T
proof fn tracked_expect(tracked self, msg: &str) -> tracked t : T
requires
self.is_Ok(),ensurest == self->Ok_0,Sourceproof fn tracked_expect_err(tracked self, msg: &str) -> tracked t : E
proof fn tracked_expect_err(tracked self, msg: &str) -> tracked t : E
requires
self.is_Err(),ensurest == self->Err_0,Implementations on Foreign Types§
Source§impl<T, E> ResultAdditionalSpecFns<T, E> for Result<T, E>
impl<T, E> ResultAdditionalSpecFns<T, E> for Result<T, E>
Source§open spec fn is_Ok(&self) -> bool
👎Deprecated: is_Variant is deprecated - use -> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.html
open spec fn is_Ok(&self) -> bool
-> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.html{ is_variant(self, "Ok") }Source§open spec fn get_Ok_0(&self) -> T
👎Deprecated: get_Variant is deprecated - use -> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.html
open spec fn get_Ok_0(&self) -> T
-> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.html{ get_variant_field(self, "Ok", "0") }Source§open spec fn arrow_Ok_0(&self) -> T
open spec fn arrow_Ok_0(&self) -> T
{ get_variant_field(self, "Ok", "0") }Source§open spec fn is_Err(&self) -> bool
👎Deprecated: is_Variant is deprecated - use -> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.html
open spec fn is_Err(&self) -> bool
-> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.html{ is_variant(self, "Err") }Source§open spec fn get_Err_0(&self) -> E
👎Deprecated: get_Variant is deprecated - use -> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.html
open spec fn get_Err_0(&self) -> E
-> or matches instead: https://verus-lang.github.io/verus/guide/datatypes_enum.html{ get_variant_field(self, "Err", "0") }Source§open spec fn arrow_Err_0(&self) -> E
open spec fn arrow_Err_0(&self) -> E
{ get_variant_field(self, "Err", "0") }