pub struct ProfileChunk { /* private fields */ }
Expand description
Intermediate type for all processing on a profile chunk.
Implementations§
Source§impl ProfileChunk
impl ProfileChunk
Sourcepub fn new(payload: Bytes) -> Result<Self, ProfileError>
pub fn new(payload: Bytes) -> Result<Self, ProfileError>
Parses a new Self
from raw bytes.
Sourcepub fn profile_type(&self) -> ProfileType
pub fn profile_type(&self) -> ProfileType
Returns the ProfileType
this chunk belongs to.
This is currently determined from the platform via ProfileType::from_platform
.
Sourcepub fn filter(
&self,
client_ip: Option<IpAddr>,
filter_settings: &ProjectFiltersConfig,
global_config: &GlobalConfig,
) -> Result<(), ProfileError>
pub fn filter( &self, client_ip: Option<IpAddr>, filter_settings: &ProjectFiltersConfig, global_config: &GlobalConfig, ) -> Result<(), ProfileError>
Applies inbound filters to the profile chunk.
The profile needs to be filtered (rejected) when this returns an error.
Auto Trait Implementations§
impl !Freeze for ProfileChunk
impl RefUnwindSafe for ProfileChunk
impl Send for ProfileChunk
impl Sync for ProfileChunk
impl Unpin for ProfileChunk
impl UnwindSafe for ProfileChunk
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request