pub trait EditorImplementation:
Send
+ Sync
+ Sized
+ 'static {
const USEABLE: bool = true;
// Required methods
fn edit(
stream: UnixStream,
mime_type: String,
details: InitializationDetails,
) -> Result<Self, ProcessError>;
fn create(
mime_type: String,
new_image: NewImage,
encoding_options: EncodingOptions,
) -> Result<EncodedImage, ProcessError>;
fn apply_complete(
&self,
operations: Operations,
) -> Result<CompleteEditorOutput, ProcessError>;
// Provided method
fn apply_sparse(
&self,
operations: Operations,
) -> Result<SparseEditorOutput, ProcessError> { ... }
}
Expand description
Implement this trait to create an image editor
Provided Associated Constants§
Required Methods§
fn edit( stream: UnixStream, mime_type: String, details: InitializationDetails, ) -> Result<Self, ProcessError>
fn create( mime_type: String, new_image: NewImage, encoding_options: EncodingOptions, ) -> Result<EncodedImage, ProcessError>
fn apply_complete( &self, operations: Operations, ) -> Result<CompleteEditorOutput, ProcessError>
Provided Methods§
fn apply_sparse( &self, operations: Operations, ) -> Result<SparseEditorOutput, ProcessError>
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.