Skip to main content

CreateDto

Trait CreateDto 

Source
pub trait CreateDto: Serialize {
    type Id: PaperlessId;
    type BaseType: DeserializeOwned;

    // Required method
    fn endpoint() -> &'static str;
}
Expand description

Marker trait for DTOs used to create new items.

Required Associated Types§

Source

type Id: PaperlessId

The ID type for this item.

Source

type BaseType: DeserializeOwned

The base type for the DTO.

Required Methods§

Source

fn endpoint() -> &'static str

Returns the API endpoint for this item.

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§