pub trait Item {
type Id: PaperlessId;
type BaseType: DeserializeOwned;
type CreateDto: CreateDtoObject;
type UpdateDto: UpdateDtoObject;
// Required methods
fn endpoint() -> &'static str;
fn id(&self) -> Self::Id;
}Expand description
Trait for items that can be managed via the Paperless API.
Required Associated Types§
Sourcetype Id: PaperlessId
type Id: PaperlessId
The ID type for this item.
Sourcetype BaseType: DeserializeOwned
type BaseType: DeserializeOwned
The base type used for deserialization.
Sourcetype CreateDto: CreateDtoObject
type CreateDto: CreateDtoObject
The DTO type used for creating new items.
Sourcetype UpdateDto: UpdateDtoObject
type UpdateDto: UpdateDtoObject
The DTO type used for updating existing items.
Required Methods§
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.