Skip to main content

Rfc6902

Trait Rfc6902 

Source
pub trait Rfc6902: Sized {
    // Required methods
    fn add(path: impl Into<String>, value: Value) -> Result<Self, PointerError>;
    fn copy(
        from: impl Into<String>,
        path: impl Into<String>,
    ) -> Result<Self, PointerError>;
    fn kind(&self) -> OperationKind;
    fn move_(
        from: impl Into<String>,
        path: impl Into<String>,
    ) -> Result<Self, PointerError>;
    fn remove(path: impl Into<String>) -> Result<Self, PointerError>;
    fn replace(
        path: impl Into<String>,
        value: Value,
    ) -> Result<Self, PointerError>;
    fn test(path: impl Into<String>, value: Value) -> Result<Self, PointerError>;
}
Expand description

Creates validated RFC 6902 operations.

Required Methods§

Source

fn add(path: impl Into<String>, value: Value) -> Result<Self, PointerError>

Creates an add operation.

Source

fn copy( from: impl Into<String>, path: impl Into<String>, ) -> Result<Self, PointerError>

Creates a copy operation.

Source

fn kind(&self) -> OperationKind

Returns this operation’s kind.

Source

fn move_( from: impl Into<String>, path: impl Into<String>, ) -> Result<Self, PointerError>

Creates a move operation.

Source

fn remove(path: impl Into<String>) -> Result<Self, PointerError>

Creates a remove operation.

Source

fn replace(path: impl Into<String>, value: Value) -> Result<Self, PointerError>

Creates a replace operation.

Source

fn test(path: impl Into<String>, value: Value) -> Result<Self, PointerError>

Creates a test operation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§