pub struct ScimPlugin { /* private fields */ }Implementations§
Source§impl ScimPlugin
impl ScimPlugin
Sourcepub fn reconcile_projection_endpoint(
domain: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn reconcile_projection_endpoint( domain: &str, ) -> AuthResult<ServerEndpoint<Value>>
Request complete-state reconciliation of one provisioning domain.
§Errors
Returns an error if arguments cannot be serialized.
Sourcepub fn decommission_managed_connection_endpoint(
id: &str,
domain: &str,
actor: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn decommission_managed_connection_endpoint( id: &str, domain: &str, actor: &str, ) -> AuthResult<ServerEndpoint<Value>>
Retire a managed connection and its active credentials through the trusted API.
§Errors
Returns an error if arguments cannot be serialized.
Sourcepub fn decommission_connection_endpoint(
id: &str,
domain: Option<&str>,
) -> AuthResult<ServerEndpoint<Value>>
pub fn decommission_connection_endpoint( id: &str, domain: Option<&str>, ) -> AuthResult<ServerEndpoint<Value>>
Permanently bind and retire a connection before its first provisioning request.
§Errors
Returns an error if arguments cannot be serialized.
Sourcepub fn list_managed_connection_events_endpoint(
id: &str,
domain: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn list_managed_connection_events_endpoint( id: &str, domain: &str, ) -> AuthResult<ServerEndpoint<Value>>
List the newest 100 connection events in ascending sequence order.
§Errors
Returns an error if the arguments cannot be serialized.
Sourcepub fn revoke_managed_credential_endpoint(
id: &str,
domain: &str,
credential: &str,
actor: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn revoke_managed_credential_endpoint( id: &str, domain: &str, credential: &str, actor: &str, ) -> AuthResult<ServerEndpoint<Value>>
Revoke one domain-owned credential through the trusted server API.
§Errors
Returns an error if the arguments cannot be serialized.
Sourcepub fn rotate_managed_credential_endpoint(
input: &ScimManagedCredentialRotationInput,
) -> AuthResult<ServerEndpoint<Value>>
pub fn rotate_managed_credential_endpoint( input: &ScimManagedCredentialRotationInput, ) -> AuthResult<ServerEndpoint<Value>>
Trusted rotation arguments with an actual Date expiry.
§Errors
Returns an error if the arguments cannot be serialized.
Sourcepub fn get_managed_connection_endpoint(
id: &str,
domain: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn get_managed_connection_endpoint( id: &str, domain: &str, ) -> AuthResult<ServerEndpoint<Value>>
Read domain-owned connection metadata and its current credential policy.
§Errors
Returns an error if the arguments cannot be serialized.
Sourcepub fn list_managed_connections_endpoint(
domain: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn list_managed_connections_endpoint( domain: &str, ) -> AuthResult<ServerEndpoint<Value>>
List durable connection metadata belonging to one provisioning domain.
§Errors
Returns an error if the input cannot be serialized.
Sourcepub fn create_managed_connection_endpoint(
input: &ScimManagedConnectionInput,
) -> AuthResult<ServerEndpoint<Value>>
pub fn create_managed_connection_endpoint( input: &ScimManagedConnectionInput, ) -> AuthResult<ServerEndpoint<Value>>
Create a managed connection and one independently hashed bearer credential.
§Errors
Returns an error if the arguments cannot be represented as logical input.
Source§impl ScimPlugin
impl ScimPlugin
pub fn projection<S: AuthSchema>( self, projection: Arc<dyn ScimProjection<S>>, ) -> ConfiguredScimPlugin<S>
Source§impl ScimPlugin
impl ScimPlugin
pub fn identity<S: AuthSchema>( self, identity: Arc<dyn ScimIdentity<S>>, ) -> ConfiguredScimPlugin<S>
Source§impl ScimPlugin
impl ScimPlugin
pub fn authentication<S: AuthSchema>( self, verifier: Arc<dyn ScimBearerTokenVerifier<S>>, ) -> ConfiguredScimPlugin<S>
Source§impl ScimPlugin
impl ScimPlugin
pub const fn new() -> Self
Sourcepub fn compatibility(self, options: ScimCompatibilityOptions) -> Self
pub fn compatibility(self, options: ScimCompatibilityOptions) -> Self
Configure provisioning-client input compatibility.
pub fn managed_connections(self, options: ScimManagedConnectionOptions) -> Self
pub fn connections(self, connections: Vec<ScimConnectionOptions>) -> Self
Sourcepub fn delete_user_endpoint(id: &str) -> AuthResult<ServerEndpoint<()>>
pub fn delete_user_endpoint(id: &str) -> AuthResult<ServerEndpoint<()>>
Delete a canonical User and reconcile its durable identity and access state.
§Errors
Returns an error if parameters cannot be serialized.
Sourcepub fn patch_group_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
pub fn patch_group_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
Apply SCIM PATCH operations to a connection-owned canonical Group.
§Errors
Returns an error if parameters cannot be serialized.
Sourcepub fn replace_group_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
pub fn replace_group_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
Replace all mutable attributes of a connection-owned canonical Group.
§Errors
Returns an error if parameters cannot be serialized.
Sourcepub fn delete_group_endpoint(id: &str) -> AuthResult<ServerEndpoint<()>>
pub fn delete_group_endpoint(id: &str) -> AuthResult<ServerEndpoint<()>>
Delete a connection-owned canonical SCIM Group.
§Errors
Returns an error if parameters cannot be serialized.
Sourcepub fn patch_user_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
pub fn patch_user_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
Apply ordered changes to a connection-owned canonical User.
§Errors
Returns an error if parameters cannot be serialized.
Sourcepub fn replace_user_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
pub fn replace_user_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
Replace the mutable attributes of a connection-owned canonical User.
§Errors
Returns an error if parameters cannot be serialized.
Sourcepub const fn create_user_endpoint() -> ServerEndpoint<Value>
pub const fn create_user_endpoint() -> ServerEndpoint<Value>
Provision a connection-owned canonical SCIM User.
Sourcepub const fn create_group_endpoint() -> ServerEndpoint<Value>
pub const fn create_group_endpoint() -> ServerEndpoint<Value>
Create a connection-owned canonical SCIM Group.
Sourcepub const fn users_endpoint() -> ServerEndpoint<Value>
pub const fn users_endpoint() -> ServerEndpoint<Value>
List the connection-owned SCIM Users through the server API.
Sourcepub const fn groups_endpoint() -> ServerEndpoint<Value>
pub const fn groups_endpoint() -> ServerEndpoint<Value>
List the connection-owned SCIM Groups through the server API.
Sourcepub fn user_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
pub fn user_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
Read a connection-owned SCIM User through the server API.
§Errors
Returns an error if parameters cannot be serialized.
Sourcepub fn group_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
pub fn group_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
Read a connection-owned SCIM Group through the server API.
§Errors
Returns an error if parameters cannot be serialized.
Sourcepub const fn service_provider_config_endpoint() -> ServerEndpoint<Value>
pub const fn service_provider_config_endpoint() -> ServerEndpoint<Value>
Discover the installed SCIM protocol capabilities without credentials.
Sourcepub const fn resource_types_endpoint() -> ServerEndpoint<Value>
pub const fn resource_types_endpoint() -> ServerEndpoint<Value>
List the SCIM resource types and their optional extensions.
Sourcepub const fn schemas_endpoint() -> ServerEndpoint<Value>
pub const fn schemas_endpoint() -> ServerEndpoint<Value>
List the SCIM User, Enterprise User and Group schema contracts.
Sourcepub fn schema_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
pub fn schema_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
Read a SCIM schema by its raw or URI-encoded identifier.
§Errors
Returns an error if path parameters cannot be serialized.
Sourcepub fn resource_type_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
pub fn resource_type_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
Read one case-sensitive SCIM resource type through the server API.
§Errors
Returns an error if the path parameters cannot be serialized.
Trait Implementations§
Source§impl<S: AuthSchema> AuthPlugin<S> for ScimPlugin
impl<S: AuthSchema> AuthPlugin<S> for ScimPlugin
Source§fn on_http_request_action<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<HttpRequestAction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_http_request_action<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<HttpRequestAction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
on_http_request implementations. Request-local configuration has already
been resolved from the incoming request, matching the Source HTTP handler.Source§fn static_openapi_metadata(&self) -> PluginOpenApiMetadata
fn static_openapi_metadata(&self) -> PluginOpenApiMetadata
Source§fn openapi_metadata(&self, ctx: &AuthInitContext<S>) -> PluginOpenApiMetadata
fn openapi_metadata(&self, ctx: &AuthInitContext<S>) -> PluginOpenApiMetadata
Source§fn allowed_media_types(&self, route: &AuthRoute) -> Vec<&'static str>
fn allowed_media_types(&self, route: &AuthRoute) -> Vec<&'static str>
Source§fn server_endpoints(&self) -> Vec<EndpointDefinition>
fn server_endpoints(&self) -> Vec<EndpointDefinition>
Source§fn validate_endpoint(
&self,
call: &EndpointCall,
_ctx: &AuthContext<S>,
) -> AuthResult<EndpointInput>
fn validate_endpoint( &self, call: &EndpointCall, _ctx: &AuthContext<S>, ) -> AuthResult<EndpointInput>
Source§fn on_init<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 mut AuthInitContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_init<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 mut AuthInitContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn on_endpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 EndpointCall,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<EndpointResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_endpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 EndpointCall,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<EndpointResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn on_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<AuthResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<AuthResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn rate_limits(&self) -> Vec<PluginRateLimit>
fn rate_limits(&self) -> Vec<PluginRateLimit>
Source§fn endpoint_hooks(&self) -> Vec<&dyn EndpointHook<S>>
fn endpoint_hooks(&self) -> Vec<&dyn EndpointHook<S>>
Source§fn origin_check_skip_paths(&self) -> Vec<&'static str>
fn origin_check_skip_paths(&self) -> Vec<&'static str>
Source§fn session_fields(&self) -> IndexMap<String, FieldConfig>
fn session_fields(&self) -> IndexMap<String, FieldConfig>
fn user_fields(&self) -> IndexMap<String, FieldConfig>
fn account_fields(&self) -> IndexMap<String, FieldConfig>
Source§fn on_http_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_http_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§fn on_http_response<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
_response: &'life3 AuthResponse,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn on_http_response<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
_response: &'life3 AuthResponse,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Source§fn before_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<BeforeRequestAction>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn before_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<BeforeRequestAction>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§fn on_http_endpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<HttpEndpointResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_http_endpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<HttpEndpointResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
on_request; plugins returning a native raw response can
override this method to bypass the endpoint after-hook pipeline.Source§fn after_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
response: AuthResponse,
) -> Pin<Box<dyn Future<Output = Result<AuthResponse, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn after_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
response: AuthResponse,
) -> Pin<Box<dyn Future<Output = Result<AuthResponse, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§fn on_user_created<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_user_created<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§fn on_session_created<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_session_created<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§fn on_user_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_user_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§fn on_session_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_token: &'life1 str,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_session_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_token: &'life1 str,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§impl Clone for ScimPlugin
impl Clone for ScimPlugin
Source§impl Debug for ScimPlugin
impl Debug for ScimPlugin
Auto Trait Implementations§
impl Freeze for ScimPlugin
impl RefUnwindSafe for ScimPlugin
impl Send for ScimPlugin
impl Sync for ScimPlugin
impl Unpin for ScimPlugin
impl UnsafeUnpin for ScimPlugin
impl UnwindSafe for ScimPlugin
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more