Struct RobotsDirective
pub struct RobotsDirective { /* private fields */ }Expand description
A robots directive set suitable for meta content formatting.
Implementations§
§impl RobotsDirective
impl RobotsDirective
pub const fn new(
index: IndexDirective,
follow: FollowDirective,
) -> RobotsDirective
pub const fn new( index: IndexDirective, follow: FollowDirective, ) -> RobotsDirective
Creates a robots directive from index and follow directives.
pub const fn index_follow() -> RobotsDirective
pub const fn index_follow() -> RobotsDirective
Common index,follow directive.
pub const fn noindex_nofollow() -> RobotsDirective
pub const fn noindex_nofollow() -> RobotsDirective
Common noindex,nofollow directive.
pub const fn with_snippet(self, snippet: SnippetDirective) -> RobotsDirective
pub const fn with_snippet(self, snippet: SnippetDirective) -> RobotsDirective
Sets the snippet directive.
pub const fn with_archive(self, archive: ArchiveDirective) -> RobotsDirective
pub const fn with_archive(self, archive: ArchiveDirective) -> RobotsDirective
Sets the archive directive.
pub const fn index(&self) -> IndexDirective
pub const fn index(&self) -> IndexDirective
Returns the index directive.
pub const fn follow(&self) -> FollowDirective
pub const fn follow(&self) -> FollowDirective
Returns the follow directive.
pub fn to_meta_content(&self) -> String
pub fn to_meta_content(&self) -> String
Formats this directive as a robots meta content value.
Trait Implementations§
§impl Clone for RobotsDirective
impl Clone for RobotsDirective
§fn clone(&self) -> RobotsDirective
fn clone(&self) -> RobotsDirective
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for RobotsDirective
impl Debug for RobotsDirective
§impl PartialEq for RobotsDirective
impl PartialEq for RobotsDirective
impl Eq for RobotsDirective
impl StructuralPartialEq for RobotsDirective
Auto Trait Implementations§
impl Freeze for RobotsDirective
impl RefUnwindSafe for RobotsDirective
impl Send for RobotsDirective
impl Sync for RobotsDirective
impl Unpin for RobotsDirective
impl UnsafeUnpin for RobotsDirective
impl UnwindSafe for RobotsDirective
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more