Skip to main content

Item

Trait Item 

Source
pub trait Item {
    type Id: PaperlessId;
    type BaseType: DeserializeOwned;

    // 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§

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.

Source

fn id(&self) -> Self::Id

Returns the ID of 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§