Struct twilight_http::request::guild::get_audit_log::GetAuditLog[][src]

pub struct GetAuditLog<'a> { /* fields omitted */ }

Get the audit log for a guild.

Examples

use twilight_http::Client;
use twilight_model::id::GuildId;

let client = Client::new("token");

let guild_id = GuildId(101);
let audit_log = client
// not done
    .audit_log(guild_id)
    .await?;

Implementations

impl<'a> GetAuditLog<'a>[src]

pub fn action_type(self, action_type: AuditLogEvent) -> Self[src]

Filter by an action type.

pub fn before(self, before: u64) -> Self[src]

Get audit log entries before the entry specified.

pub fn limit(self, limit: u64) -> Result<Self, GetAuditLogError>[src]

Set the maximum number of audit logs to retrieve.

The minimum is 1 and the maximum is 100.

Errors

Returns GetAuditLogError::LimitInvalid if the limit is 0 or greater than 100.

pub fn user_id(self, user_id: UserId) -> Self[src]

Filter audit log for entries from a user.

This is the user who did the auditable action, not the target of the auditable action.

Trait Implementations

impl Future for GetAuditLog<'_>[src]

type Output = Result<Option<AuditLog>>

The type of value produced on completion.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for GetAuditLog<'a>

impl<'a> Send for GetAuditLog<'a>

impl<'a> !Sync for GetAuditLog<'a>

impl<'a> Unpin for GetAuditLog<'a>

impl<'a> !UnwindSafe for GetAuditLog<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<F> IntoFuture for F where
    F: Future
[src]

type Output = <F as Future>::Output

🔬 This is a nightly-only experimental API. (into_future)

The output that the future will produce on completion.

type Future = F

🔬 This is a nightly-only experimental API. (into_future)

Which kind of future are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<Fut> TryFutureExt for Fut where
    Fut: TryFuture + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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