LookupMatch

Structin aclfastly 0.13.1View source
pub struct LookupMatch { /* private fields */ }

LookupMatch is the result of an ACL lookup which found a matching prefix.

Methods

fn action(&self) -> &MatchAction

Returns the associated prefix action.

Parameters

self: &Self

Returns

from_body_handle

View source
fn from_body_handle<R>(body_handle: R) -> Result<Self, Error>
where
R: Read,

Deserialize the given response body into a LookupMatch.

Parameters

body_handle: R

Returns

Result<Self, serde_json::error::Error>

is_allow

View source
fn is_allow(&self) -> bool

Returns true if action is Allow.

Parameters

self: &Self

Returns

bool

is_block

View source
fn is_block(&self) -> bool

Returns true if action is Block.

Parameters

self: &Self

Returns

bool

is_other

View source
fn is_other(&self, other: String) -> bool

Returns true if action is Other and matches the given value.

Parameters

self: &Self
other: String

Returns

bool
fn prefix(&self) -> &str

Returns the matching prefix.

Parameters

self: &Self

Returns

&str

Trait implementations

impl Debug for LookupMatch

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Parameters

self: &Self
f: &mut $crate::fmt::Formatter

Returns

$crate::fmt::Result

impl Deserialize for LookupMatch

deserialize

View source
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where
__D: Deserializer<'de>,

Parameters

__deserializer: __D

Returns

_serde::__private228::Result<Self, __D::Error>

impl PartialEq for LookupMatch

fn eq(&self, other: &Self) -> bool

Parameters

self: &Self
other: &Self

Returns

bool

impl Serialize for LookupMatch

serialize

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

Parameters

self: &Self
__serializer: __S

Returns

_serde::__private228::Result<__S::Ok, __S::Error>

Auto trait implementations

Blanket implementations