Struct gstreamer::log::DebugCategory
source · pub struct DebugCategory(/* private fields */);
Expand description
This is the struct that describes the categories. Once initialized with
GST_DEBUG_CATEGORY_INIT
, its values can’t be changed anymore.
Implementations§
source§impl DebugCategory
impl DebugCategory
pub fn new( name: &str, color: DebugColorFlags, description: Option<&str>, ) -> DebugCategory
pub fn get(name: &str) -> Option<DebugCategory>
sourcepub fn threshold(self) -> DebugLevel
pub fn threshold(self) -> DebugLevel
sourcepub fn set_threshold(self, threshold: DebugLevel)
pub fn set_threshold(self, threshold: DebugLevel)
Sets the threshold of the category to the given level. Debug information will only be output if the threshold is lower or equal to the level of the debugging message.
Do not use this function in production code, because other functions may change the threshold of categories as side effect. It is however a nice function to use when debugging (even from gdb).
§level
the DebugLevel
threshold to set.
sourcepub fn reset_threshold(self)
pub fn reset_threshold(self)
Resets the threshold of the category to the default level. Debug information
will only be output if the threshold is lower or equal to the level of the
debugging message.
Use this function to set the threshold back to where it was after using
set_threshold()
.
pub fn above_threshold(self, level: DebugLevel) -> bool
sourcepub fn color(self) -> DebugColorFlags
pub fn color(self) -> DebugColorFlags
Returns the color of a debug category used when printing output in this category.
§Returns
the color of the category.
sourcepub fn description<'a>(self) -> Option<&'a str>
pub fn description<'a>(self) -> Option<&'a str>
pub fn log( self, obj: Option<&impl IsA<Object>>, level: DebugLevel, file: &GStr, function: &str, line: u32, args: Arguments<'_>, )
pub fn log_literal( self, obj: Option<&impl IsA<Object>>, level: DebugLevel, file: &GStr, function: &str, line: u32, msg: &GStr, )
sourcepub fn log_unfiltered(
self,
obj: Option<&impl IsA<Object>>,
level: DebugLevel,
file: &GStr,
function: &str,
line: u32,
args: Arguments<'_>,
)
pub fn log_unfiltered( self, obj: Option<&impl IsA<Object>>, level: DebugLevel, file: &GStr, function: &str, line: u32, args: Arguments<'_>, )
Logs without checking the log level.
sourcepub fn log_literal_unfiltered(
self,
obj: Option<&impl IsA<Object>>,
level: DebugLevel,
file: &GStr,
function: &str,
line: u32,
msg: &GStr,
)
pub fn log_literal_unfiltered( self, obj: Option<&impl IsA<Object>>, level: DebugLevel, file: &GStr, function: &str, line: u32, msg: &GStr, )
Logs without checking the log level.
pub fn log_id( self, id: impl AsRef<GStr>, level: DebugLevel, file: &GStr, function: &str, line: u32, args: Arguments<'_>, )
pub fn log_id_literal( self, id: impl AsRef<GStr>, level: DebugLevel, file: &GStr, function: &str, line: u32, msg: &GStr, )
sourcepub fn log_id_unfiltered(
self,
id: impl AsRef<GStr>,
level: DebugLevel,
file: &GStr,
function: &str,
line: u32,
args: Arguments<'_>,
)
pub fn log_id_unfiltered( self, id: impl AsRef<GStr>, level: DebugLevel, file: &GStr, function: &str, line: u32, args: Arguments<'_>, )
Logs without checking the log level.
sourcepub fn log_id_literal_unfiltered(
self,
id: impl AsRef<GStr>,
level: DebugLevel,
file: &GStr,
function: &str,
line: u32,
msg: &GStr,
)
pub fn log_id_literal_unfiltered( self, id: impl AsRef<GStr>, level: DebugLevel, file: &GStr, function: &str, line: u32, msg: &GStr, )
Logs without checking the log level.
pub fn all_categories() -> SList<DebugCategory>
pub fn get_line( &self, level: DebugLevel, file: &GStr, function: &GStr, line: u32, object: Option<&LoggedObject>, message: &DebugMessage, ) -> Option<GString>
Trait Implementations§
source§impl Clone for DebugCategory
impl Clone for DebugCategory
source§fn clone(&self) -> DebugCategory
fn clone(&self) -> DebugCategory
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DebugCategory
impl Debug for DebugCategory
source§impl FromGlibPtrFull<*mut GstDebugCategory> for DebugCategory
impl FromGlibPtrFull<*mut GstDebugCategory> for DebugCategory
source§unsafe fn from_glib_full(ptr: *mut GstDebugCategory) -> Self
unsafe fn from_glib_full(ptr: *mut GstDebugCategory) -> Self
source§impl FromGlibPtrNone<*mut GstDebugCategory> for DebugCategory
impl FromGlibPtrNone<*mut GstDebugCategory> for DebugCategory
source§unsafe fn from_glib_none(ptr: *mut GstDebugCategory) -> Self
unsafe fn from_glib_none(ptr: *mut GstDebugCategory) -> Self
source§impl GlibPtrDefault for DebugCategory
impl GlibPtrDefault for DebugCategory
type GlibType = *mut GstDebugCategory
source§impl PartialEq for DebugCategory
impl PartialEq for DebugCategory
impl Copy for DebugCategory
impl Eq for DebugCategory
impl Send for DebugCategory
impl StructuralPartialEq for DebugCategory
impl Sync for DebugCategory
impl TransparentPtrType for DebugCategory
Auto Trait Implementations§
impl Freeze for DebugCategory
impl RefUnwindSafe for DebugCategory
impl Unpin for DebugCategory
impl UnwindSafe for DebugCategory
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more