Trait Operation

Source
pub trait Operation:
    Debug
    + WriteXml
    + Send
    + Sync
    + Sized {
    type Builder<'a>: Builder<'a, Self>;
    type Reply: Debug + ReadXml + IntoResult;

    const NAME: &'static str;
    const REQUIRED_CAPABILITIES: Requirements;

    // Provided method
    fn new<'a, F>(ctx: &'a Context, build_fn: F) -> Result<Self, Error>
       where F: FnOnce(Self::Builder<'a>) -> Result<Self, Error> { ... }
}
Available on crate features ssh or tls only.

Required Associated Constants§

Source

const NAME: &'static str

Source

const REQUIRED_CAPABILITIES: Requirements

Required Associated Types§

Provided Methods§

Source

fn new<'a, F>(ctx: &'a Context, build_fn: F) -> Result<Self, Error>
where F: FnOnce(Self::Builder<'a>) -> Result<Self, Error>,

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§

Source§

impl Operation for CancelCommit

Source§

const NAME: &'static str = "cancel-commit"

Source§

const REQUIRED_CAPABILITIES: Requirements

Source§

type Builder<'a> = Builder<'a>

Source§

type Reply = EmptyReply

Source§

impl Operation for Commit

Source§

const NAME: &'static str = "commit"

Source§

const REQUIRED_CAPABILITIES: Requirements

Source§

type Builder<'a> = Builder<'a>

Source§

type Reply = EmptyReply

Source§

impl Operation for CopyConfig

Source§

const NAME: &'static str = "copy-config"

Source§

const REQUIRED_CAPABILITIES: Requirements = Requirements::None

Source§

type Builder<'a> = Builder<'a>

Source§

type Reply = EmptyReply

Source§

impl Operation for DeleteConfig

Source§

const NAME: &'static str = "delete-config"

Source§

const REQUIRED_CAPABILITIES: Requirements = Requirements::None

Source§

type Builder<'a> = Builder<'a>

Source§

type Reply = EmptyReply

Source§

impl Operation for DiscardChanges

Source§

const NAME: &'static str = "discard-changes"

Source§

const REQUIRED_CAPABILITIES: Requirements

Source§

type Builder<'a> = Builder<'a>

Source§

type Reply = EmptyReply

Source§

impl Operation for Get

Source§

const NAME: &'static str = "get"

Source§

const REQUIRED_CAPABILITIES: Requirements = Requirements::None

Source§

type Builder<'a> = Builder

Source§

type Reply = DataReply<Opaque>

Source§

impl Operation for KillSession

Source§

const NAME: &'static str = "kill-session"

Source§

const REQUIRED_CAPABILITIES: Requirements = Requirements::None

Source§

type Builder<'a> = Builder<'a>

Source§

type Reply = EmptyReply

Source§

impl Operation for Lock

Source§

const NAME: &'static str = "lock"

Source§

const REQUIRED_CAPABILITIES: Requirements = Requirements::None

Source§

type Builder<'a> = Builder<'a>

Source§

type Reply = EmptyReply

Source§

impl Operation for Unlock

Source§

const NAME: &'static str = "unlock"

Source§

const REQUIRED_CAPABILITIES: Requirements = Requirements::None

Source§

type Builder<'a> = Builder<'a>

Source§

type Reply = EmptyReply

Source§

impl Operation for Validate

Source§

const NAME: &'static str = "validate"

Source§

const REQUIRED_CAPABILITIES: Requirements

Source§

type Builder<'a> = Builder<'a>

Source§

type Reply = EmptyReply

Source§

impl<D> Operation for EditConfig<D>
where D: WriteXml + Debug + Send + Sync,

Source§

const NAME: &'static str = "edit-config"

Source§

const REQUIRED_CAPABILITIES: Requirements = Requirements::None

Source§

type Builder<'a> = Builder<'a, D>

Source§

type Reply = EmptyReply

Source§

impl<D> Operation for GetConfig<D>
where D: ReadXml + Debug + Send + Sync,

Source§

const NAME: &'static str = "get-config"

Source§

const REQUIRED_CAPABILITIES: Requirements = Requirements::None

Source§

type Builder<'a> = Builder<'a>

Source§

type Reply = DataReply<D>