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§
Sourcefn add(path: impl Into<String>, value: Value) -> Result<Self, PointerError>
fn add(path: impl Into<String>, value: Value) -> Result<Self, PointerError>
Creates an add operation.
Sourcefn copy(
from: impl Into<String>,
path: impl Into<String>,
) -> Result<Self, PointerError>
fn copy( from: impl Into<String>, path: impl Into<String>, ) -> Result<Self, PointerError>
Creates a copy operation.
Sourcefn kind(&self) -> OperationKind
fn kind(&self) -> OperationKind
Returns this operation’s kind.
Sourcefn move_(
from: impl Into<String>,
path: impl Into<String>,
) -> Result<Self, PointerError>
fn move_( from: impl Into<String>, path: impl Into<String>, ) -> Result<Self, PointerError>
Creates a move operation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".