Struct cylon::Cylon [−][src]
A Cylon is a DFA that recognizes rules from a compiled robots.txt file. By providing it a URL path, it can decide whether or not the robots file that compiled it allows or disallows that path in roughly O(n) time, where n is the length of the path.
Implementations
impl Cylon
[src]
pub fn allow(&self, path: &str) -> bool
[src]
Match whether the rules allow or disallow the target path.
pub fn compile(rules: Vec<Rule<'_>>) -> Self
[src]
Compile a machine from a list of rules.
Trait Implementations
impl Debug for Cylon
[src]
impl<'de> Deserialize<'de> for Cylon
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Cylon
[src]
Auto Trait Implementations
impl RefUnwindSafe for Cylon
[src]
impl Send for Cylon
[src]
impl Sync for Cylon
[src]
impl Unpin for Cylon
[src]
impl UnwindSafe for Cylon
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,