ClientKillOptions

Struct ClientKillOptions 

Source
pub struct ClientKillOptions<'a> { /* private fields */ }
Expand description

Options for the client-kill command.

Implementations§

Source§

impl<'a> ClientKillOptions<'a>

Source

pub fn id(self, client_id: i64) -> Self

Source

pub fn client_type(self, client_type: ClientType) -> Self

Source

pub fn user(self, username: &'a str) -> Self

Source

pub fn addr(self, ip: &'a str, port: u16) -> Self

Address in the format of ip:port

The ip:port should match a line returned by the client_list command (addr field).

Source

pub fn laddr(self, ip: &'a str, port: u16) -> Self

Kill all clients connected to specified local (bind) address.

Source

pub fn skip_me(self, skip_me: bool) -> Self

By default this option is set to yes, that is, the client calling the command will not get killed, however setting this option to no will have the effect of also killing the client calling the command.

Source

pub fn max_age(self, seconds: u64) -> Self

Closes all the connections that are older than the specified age, in seconds.

Trait Implementations§

Source§

impl<'a> Default for ClientKillOptions<'a>

Source§

fn default() -> ClientKillOptions<'a>

Returns the “default value” for a type. Read more
Source§

impl<'a> Serialize for ClientKillOptions<'a>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for ClientKillOptions<'a>

§

impl<'a> RefUnwindSafe for ClientKillOptions<'a>

§

impl<'a> Send for ClientKillOptions<'a>

§

impl<'a> Sync for ClientKillOptions<'a>

§

impl<'a> Unpin for ClientKillOptions<'a>

§

impl<'a> UnwindSafe for ClientKillOptions<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V