Struct opentelemetry::sdk::resource::Resource [−][src]
pub struct Resource { /* fields omitted */ }
Describes an entity about which identifying information and metadata is exposed.
Items are sorted by their key, and are only overwritten if the value is an empty string.
Implementations
impl Resource
[src]
impl Resource
[src]pub fn new<T: IntoIterator<Item = KeyValue>>(kvs: T) -> Self
[src]
pub fn new<T: IntoIterator<Item = KeyValue>>(kvs: T) -> Self
[src]Create a new Resource
from key value pairs.
Values are de-duplicated by key, and the first key-value pair with a non-empty string value will be retained
pub fn from_detectors(
timeout: Duration,
detectors: Vec<Box<dyn ResourceDetector>>
) -> Self
[src]
pub fn from_detectors(
timeout: Duration,
detectors: Vec<Box<dyn ResourceDetector>>
) -> Self
[src]Create a new Resource
from resource detectors.
timeout will be applied to each detector.
pub fn merge(&self, other: &Self) -> Self
[src]
pub fn merge(&self, other: &Self) -> Self
[src]Create a new Resource
by combining two resources.
Keys from the other
resource have priority over keys from this resource, even if the
updated value is empty.
Trait Implementations
impl<'de> Deserialize<'de> for Resource
[src]
impl<'de> Deserialize<'de> for Resource
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl IntoIterator for Resource
[src]
impl IntoIterator for Resource
[src]impl<'a> IntoIterator for &'a Resource
[src]
impl<'a> IntoIterator for &'a Resource
[src]impl StructuralPartialEq for Resource
[src]
Auto Trait Implementations
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnwindSafe for Resource
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,