Struct UUri

Source
pub struct UUri {
    pub authority_name: String,
    pub ue_id: u32,
    pub ue_version_major: u32,
    pub resource_id: u32,
    pub special_fields: SpecialFields,
}

Fields§

§authority_name: String§ue_id: u32§ue_version_major: u32§resource_id: u32§special_fields: SpecialFields

Implementations§

Source§

impl UUri

Source

pub fn to_uri(&self, include_scheme: bool) -> String

Serializes this UUri to a URI string.

§Arguments
  • include_scheme - Indicates whether to include the uProtocol scheme (up) in the URI.
§Returns

The URI as defined by the uProtocol Specification.

§Examples
use up_rust::UUri;

let uuri = UUri {
    authority_name: String::from("VIN.vehicles"),
    ue_id: 0x0000_800A,
    ue_version_major: 0x02,
    resource_id: 0x0000_1a50,
    ..Default::default()
};

let uri_string = uuri.to_uri(true);
assert_eq!(uri_string, "up://VIN.vehicles/800A/2/1A50");
Source

pub fn try_from_parts( authority: &str, entity_id: u32, entity_version: u8, resource_id: u16, ) -> Result<Self, UUriError>

Creates a new UUri from its parts.

§Errors

Returns a UUriError::ValidationError if the authority does not comply with the UUri specification.

§Examples
use up_rust::UUri;

assert!(UUri::try_from_parts("vin", 0x0000_5a6b, 0x01, 0x0001).is_ok());
Source

pub fn any() -> Self

Gets a URI that consists of wildcards only and therefore matches any URI.

Source

pub fn any_with_resource_id(resource_id: u32) -> Self

Gets a URI that consists of wildcards and the specific resource ID.

Source

pub fn authority_name(&self) -> String

Gets the authority name part from this uProtocol URI.

§Examples
use up_rust::UUri;

let uri = UUri::try_from_parts("my-vehicle", 0x10101234, 0x01, 0x9a10).unwrap();
assert_eq!(uri.authority_name(), *"my-vehicle");
Source

pub fn uentity_type_id(&self) -> u16

§Examples
use up_rust::UUri;

let uri = UUri::try_from_parts("my-vehicle", 0x10101234, 0x01, 0x9a10).unwrap();
assert_eq!(uri.uentity_type_id(), 0x1234);
Source

pub fn uentity_instance_id(&self) -> u16

§Examples
use up_rust::UUri;

let uri = UUri::try_from_parts("my-vehicle", 0x10101234, 0x01, 0x9a10).unwrap();
assert_eq!(uri.uentity_instance_id(), 0x1010);
Source

pub fn uentity_major_version(&self) -> u8

§Examples
use up_rust::UUri;

let uri = UUri::try_from_parts("my-vehicle", 0x10101234, 0x01, 0x9a10).unwrap();
assert_eq!(uri.uentity_major_version(), 0x01);
Source

pub fn resource_id(&self) -> u16

§Examples
use up_rust::UUri;

let uri = UUri::try_from_parts("my-vehicle", 0x10101234, 0x01, 0x9a10).unwrap();
assert_eq!(uri.resource_id(), 0x9a10);
Source

pub fn check_validity(&self) -> Result<(), UUriError>

Verifies that this UUri is indeed a valid uProtocol URI.

This check is not necessary, if any of UUri’s constructors functions has been used to create the URI. However, if the origin of a UUri is unknown, e.g. when it has been deserialized from a protobuf, then this function can be used to check if all properties are compliant with the uProtocol specification.

§Errors

Returns an error if this UUri is not a valid uProtocol URI. The returned error may contain details regarding the cause of the validation to have failed.

§Examples
use up_rust::UUri;

let uuri = UUri {
  authority_name: "valid_name".into(),
  ue_id: 0x1000,
  ue_version_major: 0x01,
  resource_id: 0x8100,
  ..Default::default()
};
assert!(uuri.check_validity().is_ok());
Source

pub fn is_empty(&self) -> bool

Checks if this URI is empty.

§Returns

‘true’ if this URI is equal to UUri::default(), false otherwise.

§Examples
use up_rust::UUri;

let uuri = UUri::try_from_parts("MYVIN", 0xa13b, 0x01, 0x7f4e).unwrap();
assert!(!uuri.is_empty());
assert!(UUri::default().is_empty());
Source

pub fn is_remote(&self, other_uri: &UUri) -> bool

Check if an UUri is remote, by comparing authority fields. UUris with empty authority are considered to be local.

§Returns

‘true’ if other_uri has a different authority than Self, false otherwise.

§Examples
use std::str::FromStr;
use up_rust::UUri;

let authority_a = UUri::from_str("up://Authority.A/100A/1/0").unwrap();
let authority_b = UUri::from_str("up://Authority.B/200B/2/20").unwrap();
assert!(authority_a.is_remote(&authority_b));

let authority_local = UUri::from_str("up:///100A/1/0").unwrap();
assert!(!authority_local.is_remote(&authority_a));

let authority_wildcard = UUri::from_str("up://*/100A/1/0").unwrap();
assert!(!authority_wildcard.is_remote(&authority_a));
assert!(!authority_a.is_remote(&authority_wildcard));
assert!(!authority_wildcard.is_remote(&authority_wildcard));
Source

pub fn is_remote_authority(&self, authority: &String) -> bool

Check if an authority is remote compared to the authority field of the UUri. Empty authorities are considered to be local.

§Returns

‘true’ if authority is a different than Self.authority_name, false otherwise.

§Examples
use std::str::FromStr;
use up_rust::UUri;

let authority_a = UUri::from_str("up://Authority.A/100A/1/0").unwrap();
let authority_b = "Authority.B".to_string();
assert!(authority_a.is_remote_authority(&authority_b));

let authority_local = "".to_string();
assert!(!authority_a.is_remote_authority(&authority_local));

let authority_wildcard = "*".to_string();
assert!(!authority_a.is_remote_authority(&authority_wildcard));
Source

pub fn has_empty_authority(&self) -> bool

Checks if this UUri has an empty authority name.

§Examples
use up_rust::UUri;

let uuri = UUri::try_from_parts("", 0x9b3a, 0x01, 0x145b).unwrap();
assert!(uuri.has_empty_authority());
Source

pub fn has_wildcard_authority(&self) -> bool

Checks if this UUri has a wildcard authority name.

§Examples
use up_rust::UUri;

let uuri = UUri::try_from_parts("*", 0x9b3a, 0x01, 0x145b).unwrap();
assert!(uuri.has_wildcard_authority());
Source

pub fn has_wildcard_entity_instance(&self) -> bool

Checks if this UUri has an entity identifier matching any instance.

§Examples
use up_rust::UUri;

let uuri = UUri::try_from_parts("vin", 0xFFFF_0123, 0x01, 0x145b).unwrap();
assert!(uuri.has_wildcard_entity_instance());
Source

pub fn has_wildcard_entity_type(&self) -> bool

Checks if this UUri has an entity identifier matching any type.

§Examples
use up_rust::UUri;

let uuri = UUri::try_from_parts("vin", 0x00C0_FFFF, 0x01, 0x145b).unwrap();
assert!(uuri.has_wildcard_entity_type());
Source

pub fn has_wildcard_version(&self) -> bool

Checks if this UUri has a wildcard major version.

§Examples
use up_rust::UUri;

let uuri = UUri::try_from_parts("vin", 0x9b3a, 0xFF, 0x145b).unwrap();
assert!(uuri.has_wildcard_version());
Source

pub fn has_wildcard_resource_id(&self) -> bool

Checks if this UUri has a wildcard entity identifier.

§Examples
use up_rust::UUri;

let uuri = UUri::try_from_parts("vin", 0x9b3a, 0x01, 0xFFFF).unwrap();
assert!(uuri.has_wildcard_resource_id());
Source

pub fn verify_no_wildcards(&self) -> Result<(), UUriError>

Verifies that this UUri does not contain any wildcards.

§Errors

Returns an error if any of this UUri’s properties contain a wildcard value.

§Examples
use up_rust::UUri;

let uri = UUri {
    authority_name: String::from("VIN.vehicles"),
    ue_id: 0x0000_2310,
    ue_version_major: 0x03,
    resource_id: 0xa000,
    ..Default::default()
};
assert!(uri.verify_no_wildcards().is_ok());
Source

pub fn is_rpc_method(&self) -> bool

Checks if this UUri refers to a service method.

Returns true if 0 < resource ID < 0x8000.

§Examples
use up_rust::UUri;

let uri = UUri {
    resource_id: 0x7FFF,
    ..Default::default()
};
assert!(uri.is_rpc_method());
Source

pub fn verify_rpc_method(&self) -> Result<(), UUriError>

Verifies that this UUri refers to a service method.

§Errors

Returns an error if Self::is_rpc_method fails or the UUri contains any wildcards.

§Examples
use up_rust::UUri;

let uri = UUri {
    resource_id: 0x8000,
    ..Default::default()
};
assert!(uri.verify_rpc_method().is_err());

let uri = UUri {
    resource_id: 0x0,
    ..Default::default()
};
assert!(uri.verify_rpc_method().is_err());
Source

pub fn is_notification_destination(&self) -> bool

Checks if this UUri represents a destination for a Notification.

Returns true if resource ID is 0.

§Examples
use up_rust::UUri;

let uri = UUri {
    resource_id: 0,
    ..Default::default()
};
assert!(uri.is_notification_destination());
Source

pub fn is_rpc_response(&self) -> bool

Checks if this UUri represents an RPC response address.

Returns true if resource ID is 0.

§Examples
use up_rust::UUri;

let uri = UUri {
    resource_id: 0,
    ..Default::default()
};
assert!(uri.is_rpc_response());
Source

pub fn verify_rpc_response(&self) -> Result<(), UUriError>

Verifies that this UUri represents an RPC response address.

§Errors

Returns an error if Self::is_rpc_response fails or the UUri contains any wildcards.

§Examples
use up_rust::UUri;

let uri = UUri {
    resource_id: 0x4001,
    ..Default::default()
};
assert!(uri.verify_rpc_response().is_err());
Source

pub fn is_event(&self) -> bool

Checks if this UUri can be used as the source of an event.

Returns true if resource ID >= 0x8000.

§Examples
use up_rust::UUri;

let uri = UUri {
    resource_id: 0x8000,
    ..Default::default()
};
assert!(uri.is_event());
Source

pub fn verify_event(&self) -> Result<(), UUriError>

Verifies that this UUri can be used as the source of an event.

§Errors

Returns an error if Self::is_event fails or the UUri contains any wildcards.

§Examples
use up_rust::UUri;

let uri = UUri {
    resource_id: 0x7FFF,
    ..Default::default()
};
assert!(uri.verify_event().is_err());
Source

pub fn matches(&self, candidate: &UUri) -> bool

Checks if a given candidate URI matches a pattern.

§Returns

true if the candiadate matches the pattern represented by this UUri.

§Examples
use up_rust::UUri;

let pattern = UUri::try_from("//VIN/A14F/3/FFFF").unwrap();
let candidate = UUri::try_from("//VIN/A14F/3/B1D4").unwrap();
assert!(pattern.matches(&candidate));
Source§

impl UUri

Source

pub fn new() -> UUri

Trait Implementations§

Source§

impl Clone for UUri

Source§

fn clone(&self) -> UUri

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UUri

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for &'a UUri

Source§

fn default() -> &'a UUri

Returns the “default value” for a type. Read more
Source§

impl Default for UUri

Source§

fn default() -> UUri

Returns the “default value” for a type. Read more
Source§

impl Display for UUri

Source§

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

Formats the value using the given formatter. Read more
Source§

impl From<&UUri> for String

Source§

fn from(uri: &UUri) -> Self

Serializes a uProtocol URI to a URI string.

§Arguments
  • uri - The URI to serialize. Note that the given URI is not validated before serialization. In particular, the URI’s version and resource ID length are not checked to be within limits.
§Returns

The output of UUri::to_uri without including the uProtocol scheme.

§Examples
use up_rust::UUri;

let uuri = UUri {
    authority_name: String::from("VIN.vehicles"),
    ue_id: 0x0000_800A,
    ue_version_major: 0x02,
    resource_id: 0x0000_1a50,
    ..Default::default()
};

let uri_string = String::from(&uuri);
assert_eq!(uri_string, "//VIN.vehicles/800A/2/1A50");
Source§

impl FromStr for UUri

Source§

fn from_str(uri: &str) -> Result<Self, Self::Err>

Attempts to parse a String into a UUri.

As part of the parsing, the authority of the URI is getting normalized. This means that all characters are converted to lowercase, no bytes that are in the unreserved character set remain percent-encoded, and all alphabetical characters in percent-encodings are converted to uppercase.

§Arguments
  • uri - The String to be converted into a UUri.
§Returns

A Result containing either the UUri representation of the URI or a SerializationError.

§Examples
use std::str::FromStr;
use up_rust::UUri;

let uri = UUri {
    authority_name: "VIN.vehicles".to_string(),
    ue_id: 0x000A_8000,
    ue_version_major: 0x02,
    resource_id: 0x0000_1a50,
    ..Default::default()
};

let uri_from = UUri::from_str("//VIN.vehicles/A8000/2/1A50").unwrap();
assert_eq!(uri, uri_from);
Source§

type Err = UUriError

The associated error which can be returned from parsing.
Source§

impl Hash for UUri

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Message for UUri

Source§

const NAME: &'static str = "UUri"

Message name as specified in .proto file. Read more
Source§

fn is_initialized(&self) -> bool

True iff all required fields are initialized. Always returns true for protobuf 3.
Source§

fn merge_from(&mut self, is: &mut CodedInputStream<'_>) -> Result<()>

Update this message object with fields read from given stream.
Source§

fn compute_size(&self) -> u64

Compute and cache size of this message and all nested messages. Read more
Source§

fn write_to_with_cached_sizes( &self, os: &mut CodedOutputStream<'_>, ) -> Result<()>

Write message to the stream. Read more
Source§

fn special_fields(&self) -> &SpecialFields

Special fields (unknown fields and cached size).
Source§

fn mut_special_fields(&mut self) -> &mut SpecialFields

Special fields (unknown fields and cached size).
Source§

fn new() -> UUri

Create an empty message object. Read more
Source§

fn clear(&mut self)

Reset all fields.
Source§

fn default_instance() -> &'static UUri

Return a pointer to default immutable message with static lifetime. Read more
Source§

fn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, Error>

Parse message from stream.
Source§

fn cached_size(&self) -> u32

Get size previously computed by compute_size. Read more
Source§

fn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), Error>

Write the message to the stream. Read more
Source§

fn write_length_delimited_to( &self, os: &mut CodedOutputStream<'_>, ) -> Result<(), Error>

Write the message to the stream prepending the message with message length encoded as varint.
Source§

fn write_length_delimited_to_vec(&self, vec: &mut Vec<u8>) -> Result<(), Error>

Write the message to the vec, prepend the message with message length encoded as varint.
Source§

fn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), Error>

Update this message object with fields read from given stream.
Source§

fn parse_from_reader(reader: &mut dyn Read) -> Result<Self, Error>

Parse message from reader. Parse stops on EOF or when error encountered.
Source§

fn parse_from_bytes(bytes: &[u8]) -> Result<Self, Error>

Parse message from byte array.
Source§

fn parse_from_tokio_bytes(bytes: &Bytes) -> Result<Self, Error>

Parse message from Bytes object. Resulting message may share references to the passed bytes object.
Source§

fn check_initialized(&self) -> Result<(), Error>

Check if all required fields of this object are initialized.
Source§

fn write_to_writer(&self, w: &mut dyn Write) -> Result<(), Error>

Write the message to the writer.
Source§

fn write_to_vec(&self, v: &mut Vec<u8>) -> Result<(), Error>

Write the message to bytes vec.
Source§

fn write_to_bytes(&self) -> Result<Vec<u8>, Error>

Write the message to bytes vec. Read more
Source§

fn write_length_delimited_to_writer( &self, w: &mut dyn Write, ) -> Result<(), Error>

Write the message to the writer, prepend the message with message length encoded as varint.
Source§

fn write_length_delimited_to_bytes(&self) -> Result<Vec<u8>, Error>

Write the message to the bytes vec, prepend the message with message length encoded as varint.
Source§

fn unknown_fields(&self) -> &UnknownFields

Get a reference to unknown fields.
Source§

fn mut_unknown_fields(&mut self) -> &mut UnknownFields

Get a mutable reference to unknown fields.
Source§

impl MessageFull for UUri

Source§

fn descriptor() -> MessageDescriptor

Get message descriptor for message type. Read more
Source§

fn reflect_eq(&self, other: &Self, mode: &ReflectEqMode) -> bool

Reflective equality. Read more
Source§

impl PartialEq for UUri

Source§

fn eq(&self, other: &UUri) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ProtobufValue for UUri

Source§

type RuntimeType = RuntimeTypeMessage<UUri>

Actual implementation of type properties.
Source§

impl TryFrom<&UUri> for StaticUriProvider

Source§

fn try_from(source_uri: &UUri) -> Result<Self, Self::Error>

Creates a URI provider from a UUri.

§Arguments
  • source_uri - The UUri to take the entity’s authority, entity ID and version information from. The UUri’s resource ID is ignored.
§Errors

Returns an error if the given UUri’s major version property is not a u8.

§Examples
use up_rust::{LocalUriProvider, StaticUriProvider, UUri};

let source_uri = UUri::try_from("//my-vehicle/4210/5/0").unwrap();
assert!(StaticUriProvider::try_from(&source_uri).is_ok());
§Invalid Major Version
use up_rust::{LocalUriProvider, StaticUriProvider, UUri};

let uuri_with_invalid_version = UUri {
  authority_name: "".to_string(),
  ue_id: 0x5430,
  ue_version_major: 0x1234, // not a u8
  resource_id: 0x0000,
  ..Default::default()
};
assert!(StaticUriProvider::try_from(uuri_with_invalid_version).is_err());
Source§

type Error = TryFromIntError

The type returned in the event of a conversion error.
Source§

impl TryFrom<&str> for UUri

Source§

fn try_from(uri: &str) -> Result<Self, Self::Error>

Attempts to serialize a String into a UUri.

§Arguments
  • uri - The String to be converted into a UUri.
§Returns

A Result containing either the UUri representation of the URI or a SerializationError.

§Examples
use up_rust::UUri;

let uri = UUri {
    authority_name: "".to_string(),
    ue_id: 0x001A_8000,
    ue_version_major: 0x02,
    resource_id: 0x0000_1a50,
    ..Default::default()
};

let uri_from = UUri::try_from("/1A8000/2/1A50").unwrap();
assert_eq!(uri, uri_from);
Source§

type Error = UUriError

The type returned in the event of a conversion error.
Source§

impl TryFrom<String> for UUri

Source§

fn try_from(uri: String) -> Result<Self, Self::Error>

Attempts to serialize a String into a UUri.

§Arguments
  • uri - The String to be converted into a UUri.
§Returns

A Result containing either the UUri representation of the URI or a SerializationError.

§Examples
use up_rust::UUri;

let uri = UUri {
    authority_name: "".to_string(),
    ue_id: 0x001A_8000,
    ue_version_major: 0x02,
    resource_id: 0x0000_1a50,
    ..Default::default()
};

let uri_from = UUri::try_from("/1A8000/2/1A50".to_string()).unwrap();
assert_eq!(uri, uri_from);
Source§

type Error = UUriError

The type returned in the event of a conversion error.
Source§

impl TryFrom<UUri> for StaticUriProvider

Source§

type Error = TryFromIntError

The type returned in the event of a conversion error.
Source§

fn try_from(value: UUri) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Eq for UUri

Source§

impl StructuralPartialEq for UUri

Auto Trait Implementations§

§

impl !Freeze for UUri

§

impl RefUnwindSafe for UUri

§

impl Send for UUri

§

impl Sync for UUri

§

impl Unpin for UUri

§

impl UnwindSafe for UUri

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> Any for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Source§

fn type_name(&self) -> &'static str

Source§

impl<T> AnySync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<M> MessageDyn for M
where M: MessageFull,

Source§

fn descriptor_dyn(&self) -> MessageDescriptor

Message descriptor for this message, used for reflection.
Source§

fn merge_from_dyn(&mut self, is: &mut CodedInputStream<'_>) -> Result<(), Error>

Update this message fields with contents of given stream.
Source§

fn write_to_with_cached_sizes_dyn( &self, os: &mut CodedOutputStream<'_>, ) -> Result<(), Error>

Write the message.
Source§

fn compute_size_dyn(&self) -> u64

Compute (and cache) the message size.
Source§

fn is_initialized_dyn(&self) -> bool

True iff all required fields are initialized. Always returns true for protobuf 3.
Source§

fn special_fields_dyn(&self) -> &SpecialFields

Get a reference to special fields.
Source§

fn mut_special_fields_dyn(&mut self) -> &mut SpecialFields

Get a mutable reference to special fields.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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

Source§

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more