pub struct ClientConstructorConfig {
pub params: Vec<ConstructorParam>,
pub body: String,
pub error_type: Option<String>,
}Expand description
Custom constructor configuration for an opaque handle type.
When present under [workspace.client_constructors.<TypeName>], every
backend that wraps the type in an opaque handle emits a constructor whose
body is the body template string with {type_name} and {source_path}
substituted.
Fields§
§params: Vec<ConstructorParam>Ordered list of constructor parameters.
body: StringBody template. Use {type_name} for the bare type name and
{source_path} for the fully-qualified core path.
error_type: Option<String>Error type returned by the constructor (Result<Self, ErrType>).
Defaults to String when absent.
Trait Implementations§
Source§impl Clone for ClientConstructorConfig
impl Clone for ClientConstructorConfig
Source§fn clone(&self) -> ClientConstructorConfig
fn clone(&self) -> ClientConstructorConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientConstructorConfig
impl Debug for ClientConstructorConfig
Source§impl<'de> Deserialize<'de> for ClientConstructorConfig
impl<'de> Deserialize<'de> for ClientConstructorConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ClientConstructorConfig
impl RefUnwindSafe for ClientConstructorConfig
impl Send for ClientConstructorConfig
impl Sync for ClientConstructorConfig
impl Unpin for ClientConstructorConfig
impl UnsafeUnpin for ClientConstructorConfig
impl UnwindSafe for ClientConstructorConfig
Blanket Implementations§
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
Mutably borrows from an owned value. Read more