#[repr(C)]
pub struct MDL_request { pub type_: Type, pub duration: Type, pub next_in_list: *mut MDL_request, pub prev_in_list: *mut *mut MDL_request, pub ticket: *mut MDL_ticket, pub key: MDL_key, pub m_src_file: *const c_char, pub m_src_line: uint, }
Expand description

A pending metadata lock request.

A lock request and a granted metadata lock are represented by different classes because they have different allocation sites and hence different lifetimes. The allocation of lock requests is controlled from outside of the MDL subsystem, while allocation of granted locks (tickets) is controlled within the MDL subsystem.

MDL_request is a C structure, you don’t need to call a constructor or destructor for it.

Fields§

§type_: Type

Type of metadata lock.

§duration: Type

Duration for requested lock.

§next_in_list: *mut MDL_request

Pointers for participating in the list of lock requests for this context.

§prev_in_list: *mut *mut MDL_request§ticket: *mut MDL_ticket

Pointer to the lock ticket object for this lock request. Valid only if this lock request is satisfied.

§key: MDL_key

A lock is requested based on a fully qualified name and type.

§m_src_file: *const c_char§m_src_line: uint

Implementations§

source§

impl MDL_request

source

pub unsafe fn init_with_source( &mut self, namespace_arg: Type, db_arg: *const c_char, name_arg: *const c_char, mdl_type_arg: Type, mdl_duration_arg: Type, src_file: *const c_char, src_line: uint )

source

pub unsafe fn init_by_key_with_source( &mut self, key_arg: *const MDL_key, mdl_type_arg: Type, mdl_duration_arg: Type, src_file: *const c_char, src_line: uint )

Trait Implementations§

source§

impl Debug for MDL_request

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.