Skip to main content

BuilderBinding

Trait BuilderBinding 

Source
pub trait BuilderBinding: Sized {
    type Error;
    type Builder;

    // Required methods
    fn open(name: &str) -> Result<Self, Self::Error>;
    fn builder() -> Self::Builder;
}
Expand description

Constructors/binding helpers.

This is an optional trait for backends that can be opened by name (e.g. can0) or configured via a builder pattern.

Required Associated Types§

Source

type Error

Error returned by the driver implementation.

Source

type Builder

Builder type used to configure before constructing the driver.

Required Methods§

Source

fn open(name: &str) -> Result<Self, Self::Error>

Open/bind by interface name (SocketCAN-style).

Source

fn builder() -> Self::Builder

Create a builder that can configure before constructing the driver.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§