pub struct Create;
Expand description
Create a Resource and it’s draft and live data copies.
- New resources are all set to
PrivacyLevel::Unlisted
by default
§Flow:
- Create a Resource and its two data copies with
Create
- Optionally update Resource info such as privacy, author with [
Update
] - Make updates to draft data:
a. Patch Resource data through
UpdateDraftData
b. Modify modules, through [module::Update
] - Finalize draft changes by calling
Publish
§Authorization
- One of
Admin
,AdminResource
, orManageSelfResource
Trait Implementations§
Source§impl ApiEndpoint for Create
impl ApiEndpoint for Create
Source§type Path = ResourceCreatePath
type Path = ResourceCreatePath
The path type for this endpoint.
Source§type Req = ResourceCreateRequest
type Req = ResourceCreateRequest
The request type for this endpoint.
Source§type Res = CreateResponse<ResourceId>
type Res = CreateResponse<ResourceId>
The response type for this endpoint.
Source§type Err = MetadataNotFound
type Err = MetadataNotFound
The (inner) error type for this endpoint.
Auto Trait Implementations§
impl Freeze for Create
impl RefUnwindSafe for Create
impl Send for Create
impl Sync for Create
impl Unpin for Create
impl UnwindSafe for Create
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