[][src]Trait sonic_channel::SonicChannel

pub trait SonicChannel {
    type Channel;
    pub fn stream(&self) -> &SonicStream;
pub fn start<A, S>(addr: A, password: S) -> Result<Self::Channel>
    where
        A: ToSocketAddrs,
        S: ToString
; }

This trait should be implemented for all supported sonic channels

Associated Types

type Channel[src]

Sonic channel struct

Loading content...

Required methods

pub fn stream(&self) -> &SonicStream[src]

Returns reference for sonic stream of connection

pub fn start<A, S>(addr: A, password: S) -> Result<Self::Channel> where
    A: ToSocketAddrs,
    S: ToString
[src]

Connects to sonic backend and run start command.

let search_channel = SearchChannel::start(
    "localhost:1491",
    "SecretPassword",
)?;
Loading content...

Implementors

impl SonicChannel for ControlChannel[src]

type Channel = ControlChannel

impl SonicChannel for IngestChannel[src]

type Channel = IngestChannel

impl SonicChannel for SearchChannel[src]

type Channel = SearchChannel

Loading content...