Trait capnp::traits::SetterInput
source · pub trait SetterInput<Receiver: ?Sized> {
// Required method
fn set_pointer_builder(
builder: PointerBuilder<'_>,
input: Self,
canonicalize: bool
) -> Result<()>;
}
Expand description
A trait marking types that can be passed as inputs to setter methods.
Receiver
is intended to be an Owned
, representing the destination type.
This trait allows setters to support multiple types of input. For example,
a text field setter accepts values of type &str
and of type text::Reader
.
Required Methods§
sourcefn set_pointer_builder(
builder: PointerBuilder<'_>,
input: Self,
canonicalize: bool
) -> Result<()>
fn set_pointer_builder( builder: PointerBuilder<'_>, input: Self, canonicalize: bool ) -> Result<()>
Copies the values from input
into builder
, where builder
represents the backing memory of a <Receiver as Owned>::Builder
.
End user code should never need to call this method directly.
Object Safety§
This trait is not object safe.