DMSCError

Enum DMSCError 

Source
pub enum DMSCError {
Show 29 variants Io(String), Serde(String), Config(String), Hook(String), Prometheus(String), ServiceMesh(String), InvalidState(String), InvalidInput(String), SecurityViolation(String), DeviceNotFound { device_id: String, }, DeviceAllocationFailed { device_id: String, reason: String, }, AllocationNotFound { allocation_id: String, }, ModuleNotFound { module_name: String, }, ModuleInitFailed { module_name: String, reason: String, }, ModuleStartFailed { module_name: String, reason: String, }, ModuleShutdownFailed { module_name: String, reason: String, }, CircularDependency { modules: Vec<String>, }, MissingDependency { module_name: String, dependency: String, }, Other(String), ExternalError(String), PoolError(String), DeviceError(String), RedisError(String), HttpClientError(String), TomlError(String), YamlError(String), Queue(String), FrameError(String), Database(String),
}
Expand description

Core error type for DMSC. Represents all possible errors that can occur in the library.

This enum provides a comprehensive set of error variants, each tailored to a specific error scenario encountered in DMSC. It includes variants for I/O errors, serialization errors, configuration errors, module errors, and more.

Variants§

§

Io(String)

I/O operation failed. Contains a descriptive error message.

§

Serde(String)

Serialization or deserialization failed. Contains a descriptive error message.

§

Config(String)

Configuration error. Contains a descriptive error message.

§

Hook(String)

Hook execution error. Contains a descriptive error message.

§

Prometheus(String)

Prometheus metrics error. Contains a descriptive error message.

§

ServiceMesh(String)

Service mesh error. Contains a descriptive error message.

§

InvalidState(String)

Invalid state error. Indicates an operation was attempted in an invalid state.

§

InvalidInput(String)

Invalid input error. Indicates that provided input data is not valid.

§

SecurityViolation(String)

Security violation error. Indicates a security policy or rule was violated.

§

DeviceNotFound

Device not found. Contains the device ID that was not found.

Fields

§device_id: String
§

DeviceAllocationFailed

Device allocation failed. Contains the device ID and reason for failure.

Fields

§device_id: String
§reason: String
§

AllocationNotFound

Allocation not found. Contains the allocation ID that was not found.

Fields

§allocation_id: String
§

ModuleNotFound

Module not found. Contains the module name that was not found.

Fields

§module_name: String
§

ModuleInitFailed

Module initialization failed. Contains the module name and reason for failure.

Fields

§module_name: String
§reason: String
§

ModuleStartFailed

Module start failed. Contains the module name and reason for failure.

Fields

§module_name: String
§reason: String
§

ModuleShutdownFailed

Module shutdown failed. Contains the module name and reason for failure.

Fields

§module_name: String
§reason: String
§

CircularDependency

Circular dependency detected. Contains the list of modules involved in the cycle.

Fields

§modules: Vec<String>
§

MissingDependency

Missing dependency. Contains the module name and the missing dependency.

Fields

§module_name: String
§dependency: String
§

Other(String)

Other error. Contains a descriptive error message for unclassified errors.

§

ExternalError(String)

External error. Contains a descriptive error message for external service errors.

§

PoolError(String)

Pool error. Contains a descriptive error message for connection pool errors.

§

DeviceError(String)

Device error. Contains a descriptive error message for device-related errors.

§

RedisError(String)

Redis error. Contains a descriptive error message for Redis operations.

§

HttpClientError(String)

HTTP client error. Contains a descriptive error message for HTTP requests.

§

TomlError(String)

TOML parsing error. Contains a descriptive error message for TOML parsing.

§

YamlError(String)

YAML parsing error. Contains a descriptive error message for YAML parsing.

§

Queue(String)

Queue error. Contains a descriptive error message for queue operations.

§

FrameError(String)

Frame error. Contains a descriptive error message for frame parsing/building errors.

§

Database(String)

Database error. Contains a descriptive error message for database operations.

Implementations§

Source§

impl DMSCError

Python bindings for DMSCError.

This implementation provides a Python interface for the DMSCError type, enabling Python applications to create, inspect, and handle DMSC errors. The bindings expose factory methods for creating specific error types and predicate methods for checking error variants at runtime.

§Python Usage Example
 

try:
    # Some operation that might fail
    pass
except Exception as e:
    if isinstance(e, dms.DMSCError):
        print(f"Error type: {type(e)}")
        if e.is_io():
            print("I/O error occurred")
§Available Methods
  • Factory methods: Create specific error types from Python
  • Inspection methods: Check the error variant at runtime
  • String representation: str and repr for display
Source

pub fn __str__(&self) -> String

Returns the string representation of the error.

This method implements the Python str protocol, returning a human-readable error message that describes the error. The format matches the Display trait implementation in Rust, providing consistent output across language boundaries.

Returns: A String containing the formatted error message

Source

pub fn __repr__(&self) -> String

Returns the debug representation of the error.

This method implements the Python repr protocol, returning a detailed representation suitable for debugging. Unlike str, this format includes the specific error variant and all associated data.

Returns: A String containing the debug-formatted error representation

Source

pub fn from_str(message: &str) -> Self

Creates a new DMSCError from a string message.

This factory method creates an Other variant error containing the provided message. It serves as a generic error constructor for custom error scenarios that don’t fit other specific error types.

Arguments: message: The error message describing the failure

Returns: A new DMSCError instance with Other variant

Source

pub fn io(message: &str) -> Self

Creates a new IO error.

This factory method creates an Io variant error for I/O operation failures. Use this when file operations, network I/O, or other standard I/O operations fail.

Arguments: message: A description of the I/O failure

Returns: A new DMSCError instance with Io variant

Source

pub fn serde(message: &str) -> Self

Creates a new serialization error.

This factory method creates a Serde variant error for serialization or deserialization failures. Use this for JSON, binary, or other data format conversion errors.

Arguments: message: A description of the serialization failure

Returns: A new DMSCError instance with Serde variant

Source

pub fn config(message: &str) -> Self

Creates a new configuration error.

This factory method creates a Config variant error for configuration-related failures. Use this when configuration files are invalid, missing, or contain unsupported values.

Arguments: message: A description of the configuration error

Returns: A new DMSCError instance with Config variant

Source

pub fn hook(message: &str) -> Self

Creates a new hook execution error.

This factory method creates a Hook variant error for hook callback failures. Use this when a registered hook function fails to execute properly.

Arguments: message: A description of the hook execution failure

Returns: A new DMSCError instance with Hook variant

Source

pub fn is_io(&self) -> bool

Checks if this error is an IO error.

This predicate method returns true if the error is an Io variant. Use this for conditional error handling based on error type.

Returns: true if the error is an Io variant, false otherwise

Source

pub fn is_serde(&self) -> bool

Checks if this error is a serialization error.

This predicate method returns true if the error is a Serde variant. Use this for conditional error handling based on error type.

Returns: true if the error is a Serde variant, false otherwise

Source

pub fn is_config(&self) -> bool

Checks if this error is a configuration error.

This predicate method returns true if the error is a Config variant. Use this for conditional error handling based on error type.

Returns: true if the error is a Config variant, false otherwise

Source

pub fn is_hook(&self) -> bool

Checks if this error is a hook error.

This predicate method returns true if the error is a Hook variant. Use this for conditional error handling based on error type.

Returns: true if the error is a Hook variant, false otherwise

Source

pub fn is_prometheus(&self) -> bool

Checks if this error is a Prometheus metrics error.

This predicate method returns true if the error is a Prometheus variant. This method is only available when the “observability” feature is enabled.

Returns: true if the error is a Prometheus variant, false otherwise

Source

pub fn is_service_mesh(&self) -> bool

Checks if this error is a service mesh error.

This predicate method returns true if the error is a ServiceMesh variant. Use this for conditional error handling related to service mesh operations.

Returns: true if the error is a ServiceMesh variant, false otherwise

Source

pub fn is_invalid_state(&self) -> bool

Checks if this error is an invalid state error.

This predicate method returns true if the error is an InvalidState variant. Use this when an operation was attempted in an invalid program state.

Returns: true if the error is an InvalidState variant, false otherwise

Source

pub fn is_invalid_input(&self) -> bool

Checks if this error is an invalid input error.

This predicate method returns true if the error is an InvalidInput variant. Use this when provided input data fails validation checks.

Returns: true if the error is an InvalidInput variant, false otherwise

Source

pub fn is_security_violation(&self) -> bool

Checks if this error is a security violation error.

This predicate method returns true if the error is a SecurityViolation variant. Use this when a security policy or rule has been violated.

Returns: true if the error is a SecurityViolation variant, false otherwise

Source

pub fn is_device_not_found(&self) -> bool

Checks if this error is a device not found error.

This predicate method returns true if the error is a DeviceNotFound variant. Use this when a requested device identifier does not exist.

Returns: true if the error is a DeviceNotFound variant, false otherwise

Source

pub fn is_device_allocation_failed(&self) -> bool

Checks if this error is a device allocation failed error.

This predicate method returns true if the error is a DeviceAllocationFailed variant. Use this when a device cannot be allocated for use.

Returns: true if the error is a DeviceAllocationFailed variant, false otherwise

Source

pub fn is_allocation_not_found(&self) -> bool

Checks if this error is an allocation not found error.

This predicate method returns true if the error is an AllocationNotFound variant. Use this when a requested allocation identifier does not exist.

Returns: true if the error is an AllocationNotFound variant, false otherwise

Source

pub fn is_module_not_found(&self) -> bool

Checks if this error is a module not found error.

This predicate method returns true if the error is a ModuleNotFound variant. Use this when a requested module does not exist in the system.

Returns: true if the error is a ModuleNotFound variant, false otherwise

Source

pub fn is_module_init_failed(&self) -> bool

Checks if this error is a module initialization failed error.

This predicate method returns true if the error is a ModuleInitFailed variant. Use this when a module fails to initialize properly.

Returns: true if the error is a ModuleInitFailed variant, false otherwise

Source

pub fn is_module_start_failed(&self) -> bool

Checks if this error is a module start failed error.

This predicate method returns true if the error is a ModuleStartFailed variant. Use this when a module fails to start after successful initialization.

Returns: true if the error is a ModuleStartFailed variant, false otherwise

Source

pub fn is_module_shutdown_failed(&self) -> bool

Checks if this error is a module shutdown failed error.

This predicate method returns true if the error is a ModuleShutdownFailed variant. Use this when a module fails to shut down gracefully.

Returns: true if the error is a ModuleShutdownFailed variant, false otherwise

Source

pub fn is_circular_dependency(&self) -> bool

Checks if this error is a circular dependency error.

This predicate method returns true if the error is a CircularDependency variant. Use this when modules have circular import or initialization dependencies.

Returns: true if the error is a CircularDependency variant, false otherwise

Source

pub fn is_missing_dependency(&self) -> bool

Checks if this error is a missing dependency error.

This predicate method returns true if the error is a MissingDependency variant. Use this when a module depends on another module that is not available.

Returns: true if the error is a MissingDependency variant, false otherwise

Source

pub fn is_other(&self) -> bool

Checks if this error is a generic other error.

This predicate method returns true if the error is an Other variant. Use this as a catch-all check for unclassified errors.

Returns: true if the error is an Other variant, false otherwise

Source

pub fn is_external_error(&self) -> bool

Checks if this error is an external error.

This predicate method returns true if the error is an ExternalError variant. Use this for errors originating from external services or dependencies.

Returns: true if the error is an ExternalError variant, false otherwise

Source

pub fn is_pool_error(&self) -> bool

Checks if this error is a connection pool error.

This predicate method returns true if the error is a PoolError variant. Use this for errors related to connection pool management.

Returns: true if the error is a PoolError variant, false otherwise

Source

pub fn is_device_error(&self) -> bool

Checks if this error is a device error.

This predicate method returns true if the error is a DeviceError variant. Use this for general device-related errors not covered by specific variants.

Returns: true if the error is a DeviceError variant, false otherwise

Source

pub fn is_redis_error(&self) -> bool

Checks if this error is a Redis error.

This predicate method returns true if the error is a RedisError variant. This method is only available when the “redis” feature is enabled.

Returns: true if the error is a RedisError variant, false otherwise

Source

pub fn is_http_client_error(&self) -> bool

Checks if this error is an HTTP client error.

This predicate method returns true if the error is an HttpClientError variant. This method is only available when the “http_client” feature is enabled.

Returns: true if the error is an HttpClientError variant, false otherwise

Source

pub fn is_toml_error(&self) -> bool

Checks if this error is a TOML parsing error.

This predicate method returns true if the error is a TomlError variant. Use this for errors related to TOML configuration file parsing.

Returns: true if the error is a TomlError variant, false otherwise

Source

pub fn is_yaml_error(&self) -> bool

Checks if this error is a YAML parsing error.

This predicate method returns true if the error is a YamlError variant. Use this for errors related to YAML configuration file parsing.

Returns: true if the error is a YamlError variant, false otherwise

Source

pub fn is_queue(&self) -> bool

Checks if this error is a queue error.

This predicate method returns true if the error is a Queue variant. Use this for errors related to message queue operations (RabbitMQ, Kafka).

Returns: true if the error is a Queue variant, false otherwise

Trait Implementations§

Source§

impl Clone for DMSCError

Source§

fn clone(&self) -> DMSCError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DMSCError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DMSCError

Implements Display trait for human-readable error messages.

Each error variant is formatted with a clear, descriptive prefix indicating the error category, followed by the specific error details. This enables developers to quickly identify the source and nature of errors during development and debugging.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for DMSCError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<DMSCDatabaseTransactionError> for DMSCError

Source§

fn from(e: DMSCDatabaseTransactionError) -> Self

Converts to this type from the input type.
Source§

impl From<DMSCError> for PyErr

Available on crate feature pyo3 only.
Source§

fn from(error: DMSCError) -> Self

Converts to this type from the input type.
Source§

impl From<DMSCLockError> for DMSCError

Source§

fn from(error: DMSCLockError) -> Self

Converts to this type from the input type.
Source§

impl From<DMSCQueueError> for DMSCError

Source§

fn from(error: DMSCQueueError) -> Self

Converts to this type from the input type.
Source§

impl From<Elapsed> for DMSCError

Source§

fn from(error: Elapsed) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DMSCError

Enables automatic conversion from standard I/O errors to DMSC errors. This implementation wraps std::io::Error instances into DMSCError::Io variants, allowing seamless error propagation when working with file operations, network I/O, and other standard I/O operations.

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DMSCError

Enables automatic conversion from JSON serialization/deserialization errors. This implementation wraps serde_json::Error instances into DMSCError::Serde variants, providing consistent error handling for JSON parsing and generation operations.

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DMSCError

Available on crate feature observability only.

Enables automatic conversion from Prometheus metrics errors to DMSC errors. This implementation is conditionally compiled with the “observability” feature. Prometheus errors are wrapped into DMSCError::Prometheus variants.

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DMSCError

Available on crate feature http_client only.

Enables automatic conversion from HTTP client errors to DMSC errors. This implementation is conditionally compiled with the “http_client” feature. HTTP request failures, timeouts, and network errors are wrapped into DMSCError::HttpClientError variants for consistent error handling.

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DMSCError

Enables automatic conversion from TOML parsing errors to DMSC errors. This implementation wraps toml::de::Error instances into DMSCError::TomlError variants, providing consistent error handling for TOML configuration file parsing.

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DMSCError

Enables automatic conversion from TOML serialization errors to DMSC errors. This implementation wraps toml::ser::Error instances into DMSCError::TomlError variants, providing consistent error handling for TOML configuration generation.

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DMSCError

Enables automatic conversion from YAML parsing errors to DMSC errors. This implementation wraps serde_yaml::Error instances into DMSCError::YamlError variants, providing consistent error handling for YAML configuration file parsing.

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DMSCError

Available on crate feature rabbitmq only.

Enables automatic conversion from RabbitMQ client errors to DMSC errors. This implementation is conditionally compiled with the “rabbitmq” feature. RabbitMQ connection and channel errors are wrapped into DMSCError::Other variants with a “RabbitMQ error:” prefix for consistent error categorization.

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<GrpcError> for DMSCError

Source§

fn from(error: GrpcError) -> Self

Converts to this type from the input type.
Source§

impl From<KafkaError> for DMSCError

Available on crate feature kafka and non-Windows only.

Enables automatic conversion from Kafka client errors to DMSC errors. This implementation is conditionally compiled with the “kafka” feature on non-Windows platforms. Kafka producer, consumer, and administration errors are wrapped into DMSCError::Queue variants for consistent error handling in message queue operations.

Source§

fn from(error: KafkaError) -> Self

Converts to this type from the input type.
Source§

impl From<ProtocolError> for DMSCError

Source§

fn from(error: ProtocolError) -> Self

Converts to this type from the input type.
Source§

impl From<PyErr> for DMSCError

Available on crate feature pyo3 only.
Source§

fn from(error: PyErr) -> Self

Converts to this type from the input type.
Source§

impl From<RedisError> for DMSCError

Available on crate feature redis only.

Enables automatic conversion from Redis client errors to DMSC errors. This implementation is conditionally compiled with the “redis” feature. Redis errors are wrapped into DMSCError::RedisError variants, providing consistent error handling for Redis connection and operation failures.

Source§

fn from(error: RedisError) -> Self

Converts to this type from the input type.
Source§

impl From<TryLockError> for DMSCError

Source§

fn from(error: TryLockError) -> Self

Converts to this type from the input type.
Source§

impl From<Utf8Error> for DMSCError

Source§

fn from(error: Utf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<WSError> for DMSCError

Source§

fn from(error: WSError) -> Self

Converts to this type from the input type.
Source§

impl Hash for DMSCError

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'py> IntoPyObject<'py> for DMSCError

Source§

type Target = DMSCError

The Python output type
Source§

type Output = Bound<'py, <DMSCError as IntoPyObject<'py>>::Target>

The smart pointer type to use. Read more
Source§

type Error = PyErr

The type returned in the event of a conversion error.
Source§

fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>

Performs the conversion.
Source§

impl PartialEq for DMSCError

Source§

fn eq(&self, other: &DMSCError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PyClass for DMSCError

Source§

type Frozen = True

Whether the pyclass is frozen. Read more
Source§

impl PyClassBaseType for DMSCError

Source§

type LayoutAsBase = PyClassObject<DMSCError>

Source§

type BaseNativeType = <DMSCError as PyClassImpl>::BaseNativeType

Source§

type Initializer = PyClassInitializer<DMSCError>

Source§

type PyClassMutability = <DMSCError as PyClassImpl>::PyClassMutability

Source§

impl PyClassImpl for DMSCError

Source§

const IS_BASETYPE: bool = true

#[pyclass(subclass)]
Source§

const IS_SUBCLASS: bool = false

#[pyclass(extends=…)]
Source§

const IS_MAPPING: bool = false

#[pyclass(mapping)]
Source§

const IS_SEQUENCE: bool = false

#[pyclass(sequence)]
Source§

const IS_IMMUTABLE_TYPE: bool = false

#[pyclass(immutable_type)]
Source§

const RAW_DOC: &'static CStr = /// configuration errors, module errors, and more.

Docstring for the class provided on the struct or enum. Read more
Source§

const DOC: &'static CStr

Fully rendered class doc, including the text_signature if a constructor is defined. Read more
Source§

type BaseType = PyAny

Base class
Source§

type ThreadChecker = SendablePyClass<DMSCError>

This handles following two situations: Read more
Source§

type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild

Immutable or mutable
Source§

type Dict = PyClassDummySlot

Specify this class has #[pyclass(dict)] or not.
Source§

type WeakRef = PyClassDummySlot

Specify this class has #[pyclass(weakref)] or not.
Source§

type BaseNativeType = PyAny

The closest native ancestor. This is PyAny by default, and when you declare #[pyclass(extends=PyDict)], it’s PyDict.
Source§

fn items_iter() -> PyClassItemsIter

Source§

fn lazy_type_object() -> &'static LazyTypeObject<Self>

§

fn dict_offset() -> Option<isize>

§

fn weaklist_offset() -> Option<isize>

Source§

impl PyMethods<DMSCError> for PyClassImplCollector<DMSCError>

Source§

fn py_methods(self) -> &'static PyClassItems

Source§

impl PyTypeInfo for DMSCError

Source§

const NAME: &'static str = "DMSCError"

Class name.
Source§

const MODULE: Option<&'static str> = ::core::option::Option::None

Module name, if any.
Source§

fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject

Returns the PyTypeObject instance for this type.
§

fn type_object(py: Python<'_>) -> Bound<'_, PyType>

Returns the safe abstraction over the type object.
§

fn is_type_of(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type or a subclass of this type.
§

fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type.
Source§

impl Eq for DMSCError

Source§

impl ExtractPyClassWithClone for DMSCError

Source§

impl StructuralPartialEq for DMSCError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<'a, 'py, T> FromPyObject<'a, 'py> for T
where T: PyClass + Clone + ExtractPyClassWithClone,

§

type Error = PyClassGuardError<'a, 'py>

The type returned in the event of a conversion error. Read more
§

fn extract( obj: Borrowed<'a, 'py, PyAny>, ) -> Result<T, <T as FromPyObject<'a, 'py>>::Error>

Extracts Self from the bound smart pointer obj. Read more
§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<'py, T> IntoPyObjectExt<'py> for T
where T: IntoPyObject<'py>,

§

fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>

Converts self into an owned Python object, dropping type information.
§

fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>

Converts self into an owned Python object, dropping type information and unbinding it from the 'py lifetime.
§

fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>

Converts self into a Python object. Read more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PyErrArguments for T
where T: for<'py> IntoPyObject<'py> + Send + Sync,

§

fn arguments(self, py: Python<'_>) -> Py<PyAny>

Arguments for exception
§

impl<T> PyTypeCheck for T
where T: PyTypeInfo,

§

const NAME: &'static str = T::NAME

👎Deprecated since 0.27.0: Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.
Name of self. This is used in error messages, for example.
§

fn type_check(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of Self, which may include a subtype. Read more
§

fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>

Returns the expected type as a possible argument for the isinstance and issubclass function. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<'py, T> FromPyObjectOwned<'py> for T
where T: for<'a> FromPyObject<'a, 'py>,

§

impl<T> Ungil for T
where T: Send,