Skip to main content

Trip

Struct Trip 

Source
#[non_exhaustive]
pub struct Trip {
Show 34 fields pub name: String, pub vehicle_id: String, pub trip_status: TripStatus, pub trip_type: TripType, pub pickup_point: Option<TerminalLocation>, pub actual_pickup_point: Option<StopLocation>, pub actual_pickup_arrival_point: Option<StopLocation>, pub pickup_time: Option<Timestamp>, pub intermediate_destinations: Vec<TerminalLocation>, pub intermediate_destinations_version: Option<Timestamp>, pub intermediate_destination_index: i32, pub actual_intermediate_destination_arrival_points: Vec<StopLocation>, pub actual_intermediate_destinations: Vec<StopLocation>, pub dropoff_point: Option<TerminalLocation>, pub actual_dropoff_point: Option<StopLocation>, pub dropoff_time: Option<Timestamp>, pub remaining_waypoints: Vec<TripWaypoint>, pub vehicle_waypoints: Vec<TripWaypoint>, pub route: Vec<LatLng>, pub current_route_segment: String, pub current_route_segment_version: Option<Timestamp>, pub current_route_segment_traffic: Option<ConsumableTrafficPolyline>, pub current_route_segment_traffic_version: Option<Timestamp>, pub current_route_segment_end_point: Option<TripWaypoint>, pub remaining_distance_meters: Option<Int32Value>, pub eta_to_first_waypoint: Option<Timestamp>, pub remaining_time_to_first_waypoint: Option<Duration>, pub remaining_waypoints_version: Option<Timestamp>, pub remaining_waypoints_route_version: Option<Timestamp>, pub number_of_passengers: i32, pub last_location: Option<VehicleLocation>, pub last_location_snappable: bool, pub view: TripView, pub attributes: Vec<TripAttribute>, /* private fields */
}
Expand description

Trip metadata.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

Output only. In the format “providers/{provider}/trips/{trip}”

§vehicle_id: String

ID of the vehicle making this trip.

§trip_status: TripStatus

Current status of the trip.

§trip_type: TripType

The type of the trip.

§pickup_point: Option<TerminalLocation>

Location where customer indicates they will be picked up.

§actual_pickup_point: Option<StopLocation>

Input only. The actual location when and where customer was picked up. This field is for provider to provide feedback on actual pickup information.

§actual_pickup_arrival_point: Option<StopLocation>

Input only. The actual time and location of the driver arrival at the pickup point. This field is for provider to provide feedback on actual arrival information at the pickup point.

§pickup_time: Option<Timestamp>

Output only. Either the estimated future time when the rider(s) will be picked up, or the actual time when they were picked up.

§intermediate_destinations: Vec<TerminalLocation>

Intermediate stops in order that the trip requests (in addition to pickup and dropoff). Initially this will not be supported for shared trips.

§intermediate_destinations_version: Option<Timestamp>

Indicates the last time the intermediate_destinations was modified. Your server should cache this value and pass it in UpdateTripRequest when update intermediate_destination_index to ensure the intermediate_destinations is not changed.

§intermediate_destination_index: i32

When TripStatus is ENROUTE_TO_INTERMEDIATE_DESTINATION, a number between [0..N-1] indicating which intermediate destination the vehicle will cross next. When TripStatus is ARRIVED_AT_INTERMEDIATE_DESTINATION, a number between [0..N-1] indicating which intermediate destination the vehicle is at. The provider sets this value. If there are no intermediate_destinations, this field is ignored.

§actual_intermediate_destination_arrival_points: Vec<StopLocation>

Input only. The actual time and location of the driver’s arrival at an intermediate destination. This field is for provider to provide feedback on actual arrival information at intermediate destinations.

§actual_intermediate_destinations: Vec<StopLocation>

Input only. The actual time and location when and where the customer was picked up from an intermediate destination. This field is for provider to provide feedback on actual pickup information at intermediate destinations.

§dropoff_point: Option<TerminalLocation>

Location where customer indicates they will be dropped off.

§actual_dropoff_point: Option<StopLocation>

Input only. The actual time and location when and where customer was dropped off. This field is for provider to provide feedback on actual dropoff information.

§dropoff_time: Option<Timestamp>

Output only. Either the estimated future time when the rider(s) will be dropped off at the final destination, or the actual time when they were dropped off.

§remaining_waypoints: Vec<TripWaypoint>

Output only. The full path from the current location to the dropoff point, inclusive. This path could include waypoints from other trips.

§vehicle_waypoints: Vec<TripWaypoint>

This field supports manual ordering of the waypoints for the trip. It contains all of the remaining waypoints for the assigned vehicle, as well as the pickup and drop-off waypoints for this trip. If the trip hasn’t been assigned to a vehicle, then Fleet Engine ignores this field. For privacy reasons, this field is only populated by the server on UpdateTrip and CreateTrip calls, NOT on GetTrip calls.

§route: Vec<LatLng>

Output only. Anticipated route for this trip to the first entry in remaining_waypoints. Note that the first waypoint may belong to a different trip.

§current_route_segment: String

Output only. An encoded path to the next waypoint.

Note: This field is intended only for use by the Driver SDK and Consumer SDK. Decoding is not yet supported.

§current_route_segment_version: Option<Timestamp>

Output only. Indicates the last time the route was modified.

Note: This field is intended only for use by the Driver SDK and Consumer SDK.

§current_route_segment_traffic: Option<ConsumableTrafficPolyline>

Output only. Indicates the traffic conditions along the current_route_segment when they’re available.

Note: This field is intended only for use by the Driver SDK and Consumer SDK.

§current_route_segment_traffic_version: Option<Timestamp>

Output only. Indicates the last time the current_route_segment_traffic was modified.

Note: This field is intended only for use by the Driver SDK and Consumer SDK.

§current_route_segment_end_point: Option<TripWaypoint>

Output only. The waypoint where current_route_segment ends.

§remaining_distance_meters: Option<Int32Value>

Output only. The remaining driving distance in the current_route_segment field. The value is unspecified if the trip is not assigned to a vehicle, or the trip is completed or cancelled.

§eta_to_first_waypoint: Option<Timestamp>

Output only. The ETA to the next waypoint (the first entry in the remaining_waypoints field). The value is unspecified if the trip is not assigned to a vehicle, or the trip is inactive (completed or cancelled).

§remaining_time_to_first_waypoint: Option<Duration>

Output only. The duration from when the Trip data is returned to the time in Trip.eta_to_first_waypoint. The value is unspecified if the trip is not assigned to a vehicle, or the trip is inactive (completed or cancelled).

§remaining_waypoints_version: Option<Timestamp>

Output only. Indicates the last time that remaining_waypoints was changed (a waypoint was added, removed, or changed).

§remaining_waypoints_route_version: Option<Timestamp>

Output only. Indicates the last time the remaining_waypoints.path_to_waypoint and remaining_waypoints.traffic_to_waypoint were modified. Your client app should cache this value and pass it in GetTripRequest to ensure the paths and traffic for remaining_waypoints are only returned if updated.

§number_of_passengers: i32

Immutable. Indicates the number of passengers on this trip and does not include the driver. A vehicle must have available capacity to be returned in a SearchVehicles response.

§last_location: Option<VehicleLocation>

Output only. Indicates the last reported location of the vehicle along the route.

§last_location_snappable: bool

Output only. Indicates whether the vehicle’s last_location can be snapped to the current_route_segment. False if last_location or current_route_segment doesn’t exist. It is computed by Fleet Engine. Any update from clients will be ignored.

§view: TripView

The subset of Trip fields that are populated and how they should be interpreted.

§attributes: Vec<TripAttribute>

A list of custom Trip attributes. Each attribute must have a unique key.

Implementations§

Source§

impl Trip

Source

pub fn new() -> Self

Creates a new default instance.

Source

pub fn set_name<T: Into<String>>(self, v: T) -> Self

Sets the value of name.

§Example
let x = Trip::new().set_name(format!("providers/{provider_id}/trips/{trip_id}"));
Source

pub fn set_vehicle_id<T: Into<String>>(self, v: T) -> Self

Sets the value of vehicle_id.

§Example
let x = Trip::new().set_vehicle_id("example");
Source

pub fn set_trip_status<T: Into<TripStatus>>(self, v: T) -> Self

Sets the value of trip_status.

§Example
use google_maps_fleetengine_v1::model::TripStatus;
let x0 = Trip::new().set_trip_status(TripStatus::New);
let x1 = Trip::new().set_trip_status(TripStatus::EnrouteToPickup);
let x2 = Trip::new().set_trip_status(TripStatus::ArrivedAtPickup);
Source

pub fn set_trip_type<T: Into<TripType>>(self, v: T) -> Self

Sets the value of trip_type.

§Example
use google_maps_fleetengine_v1::model::TripType;
let x0 = Trip::new().set_trip_type(TripType::Shared);
let x1 = Trip::new().set_trip_type(TripType::Exclusive);
Source

pub fn set_pickup_point<T>(self, v: T) -> Self

Sets the value of pickup_point.

§Example
use google_maps_fleetengine_v1::model::TerminalLocation;
let x = Trip::new().set_pickup_point(TerminalLocation::default()/* use setters */);
Source

pub fn set_or_clear_pickup_point<T>(self, v: Option<T>) -> Self

Sets or clears the value of pickup_point.

§Example
use google_maps_fleetengine_v1::model::TerminalLocation;
let x = Trip::new().set_or_clear_pickup_point(Some(TerminalLocation::default()/* use setters */));
let x = Trip::new().set_or_clear_pickup_point(None::<TerminalLocation>);
Source

pub fn set_actual_pickup_point<T>(self, v: T) -> Self
where T: Into<StopLocation>,

Sets the value of actual_pickup_point.

§Example
use google_maps_fleetengine_v1::model::StopLocation;
let x = Trip::new().set_actual_pickup_point(StopLocation::default()/* use setters */);
Source

pub fn set_or_clear_actual_pickup_point<T>(self, v: Option<T>) -> Self
where T: Into<StopLocation>,

Sets or clears the value of actual_pickup_point.

§Example
use google_maps_fleetengine_v1::model::StopLocation;
let x = Trip::new().set_or_clear_actual_pickup_point(Some(StopLocation::default()/* use setters */));
let x = Trip::new().set_or_clear_actual_pickup_point(None::<StopLocation>);
Source

pub fn set_actual_pickup_arrival_point<T>(self, v: T) -> Self
where T: Into<StopLocation>,

Sets the value of actual_pickup_arrival_point.

§Example
use google_maps_fleetengine_v1::model::StopLocation;
let x = Trip::new().set_actual_pickup_arrival_point(StopLocation::default()/* use setters */);
Source

pub fn set_or_clear_actual_pickup_arrival_point<T>(self, v: Option<T>) -> Self
where T: Into<StopLocation>,

Sets or clears the value of actual_pickup_arrival_point.

§Example
use google_maps_fleetengine_v1::model::StopLocation;
let x = Trip::new().set_or_clear_actual_pickup_arrival_point(Some(StopLocation::default()/* use setters */));
let x = Trip::new().set_or_clear_actual_pickup_arrival_point(None::<StopLocation>);
Source

pub fn set_pickup_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of pickup_time.

§Example
use wkt::Timestamp;
let x = Trip::new().set_pickup_time(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_pickup_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of pickup_time.

§Example
use wkt::Timestamp;
let x = Trip::new().set_or_clear_pickup_time(Some(Timestamp::default()/* use setters */));
let x = Trip::new().set_or_clear_pickup_time(None::<Timestamp>);
Source

pub fn set_intermediate_destinations<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<TerminalLocation>,

Sets the value of intermediate_destinations.

§Example
use google_maps_fleetengine_v1::model::TerminalLocation;
let x = Trip::new()
    .set_intermediate_destinations([
        TerminalLocation::default()/* use setters */,
        TerminalLocation::default()/* use (different) setters */,
    ]);
Source

pub fn set_intermediate_destinations_version<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of intermediate_destinations_version.

§Example
use wkt::Timestamp;
let x = Trip::new().set_intermediate_destinations_version(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_intermediate_destinations_version<T>( self, v: Option<T>, ) -> Self
where T: Into<Timestamp>,

Sets or clears the value of intermediate_destinations_version.

§Example
use wkt::Timestamp;
let x = Trip::new().set_or_clear_intermediate_destinations_version(Some(Timestamp::default()/* use setters */));
let x = Trip::new().set_or_clear_intermediate_destinations_version(None::<Timestamp>);
Source

pub fn set_intermediate_destination_index<T: Into<i32>>(self, v: T) -> Self

Sets the value of intermediate_destination_index.

§Example
let x = Trip::new().set_intermediate_destination_index(42);
Source

pub fn set_actual_intermediate_destination_arrival_points<T, V>( self, v: T, ) -> Self
where T: IntoIterator<Item = V>, V: Into<StopLocation>,

Sets the value of actual_intermediate_destination_arrival_points.

§Example
use google_maps_fleetengine_v1::model::StopLocation;
let x = Trip::new()
    .set_actual_intermediate_destination_arrival_points([
        StopLocation::default()/* use setters */,
        StopLocation::default()/* use (different) setters */,
    ]);
Source

pub fn set_actual_intermediate_destinations<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<StopLocation>,

Sets the value of actual_intermediate_destinations.

§Example
use google_maps_fleetengine_v1::model::StopLocation;
let x = Trip::new()
    .set_actual_intermediate_destinations([
        StopLocation::default()/* use setters */,
        StopLocation::default()/* use (different) setters */,
    ]);
Source

pub fn set_dropoff_point<T>(self, v: T) -> Self

Sets the value of dropoff_point.

§Example
use google_maps_fleetengine_v1::model::TerminalLocation;
let x = Trip::new().set_dropoff_point(TerminalLocation::default()/* use setters */);
Source

pub fn set_or_clear_dropoff_point<T>(self, v: Option<T>) -> Self

Sets or clears the value of dropoff_point.

§Example
use google_maps_fleetengine_v1::model::TerminalLocation;
let x = Trip::new().set_or_clear_dropoff_point(Some(TerminalLocation::default()/* use setters */));
let x = Trip::new().set_or_clear_dropoff_point(None::<TerminalLocation>);
Source

pub fn set_actual_dropoff_point<T>(self, v: T) -> Self
where T: Into<StopLocation>,

Sets the value of actual_dropoff_point.

§Example
use google_maps_fleetengine_v1::model::StopLocation;
let x = Trip::new().set_actual_dropoff_point(StopLocation::default()/* use setters */);
Source

pub fn set_or_clear_actual_dropoff_point<T>(self, v: Option<T>) -> Self
where T: Into<StopLocation>,

Sets or clears the value of actual_dropoff_point.

§Example
use google_maps_fleetengine_v1::model::StopLocation;
let x = Trip::new().set_or_clear_actual_dropoff_point(Some(StopLocation::default()/* use setters */));
let x = Trip::new().set_or_clear_actual_dropoff_point(None::<StopLocation>);
Source

pub fn set_dropoff_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of dropoff_time.

§Example
use wkt::Timestamp;
let x = Trip::new().set_dropoff_time(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_dropoff_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of dropoff_time.

§Example
use wkt::Timestamp;
let x = Trip::new().set_or_clear_dropoff_time(Some(Timestamp::default()/* use setters */));
let x = Trip::new().set_or_clear_dropoff_time(None::<Timestamp>);
Source

pub fn set_remaining_waypoints<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<TripWaypoint>,

Sets the value of remaining_waypoints.

§Example
use google_maps_fleetengine_v1::model::TripWaypoint;
let x = Trip::new()
    .set_remaining_waypoints([
        TripWaypoint::default()/* use setters */,
        TripWaypoint::default()/* use (different) setters */,
    ]);
Source

pub fn set_vehicle_waypoints<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<TripWaypoint>,

Sets the value of vehicle_waypoints.

§Example
use google_maps_fleetengine_v1::model::TripWaypoint;
let x = Trip::new()
    .set_vehicle_waypoints([
        TripWaypoint::default()/* use setters */,
        TripWaypoint::default()/* use (different) setters */,
    ]);
Source

pub fn set_route<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<LatLng>,

Sets the value of route.

§Example
use google_cloud_type::model::LatLng;
let x = Trip::new()
    .set_route([
        LatLng::default()/* use setters */,
        LatLng::default()/* use (different) setters */,
    ]);
Source

pub fn set_current_route_segment<T: Into<String>>(self, v: T) -> Self

Sets the value of current_route_segment.

§Example
let x = Trip::new().set_current_route_segment("example");
Source

pub fn set_current_route_segment_version<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of current_route_segment_version.

§Example
use wkt::Timestamp;
let x = Trip::new().set_current_route_segment_version(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_current_route_segment_version<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of current_route_segment_version.

§Example
use wkt::Timestamp;
let x = Trip::new().set_or_clear_current_route_segment_version(Some(Timestamp::default()/* use setters */));
let x = Trip::new().set_or_clear_current_route_segment_version(None::<Timestamp>);
Source

pub fn set_current_route_segment_traffic<T>(self, v: T) -> Self

Sets the value of current_route_segment_traffic.

§Example
use google_maps_fleetengine_v1::model::ConsumableTrafficPolyline;
let x = Trip::new().set_current_route_segment_traffic(ConsumableTrafficPolyline::default()/* use setters */);
Source

pub fn set_or_clear_current_route_segment_traffic<T>(self, v: Option<T>) -> Self

Sets or clears the value of current_route_segment_traffic.

§Example
use google_maps_fleetengine_v1::model::ConsumableTrafficPolyline;
let x = Trip::new().set_or_clear_current_route_segment_traffic(Some(ConsumableTrafficPolyline::default()/* use setters */));
let x = Trip::new().set_or_clear_current_route_segment_traffic(None::<ConsumableTrafficPolyline>);
Source

pub fn set_current_route_segment_traffic_version<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of current_route_segment_traffic_version.

§Example
use wkt::Timestamp;
let x = Trip::new().set_current_route_segment_traffic_version(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_current_route_segment_traffic_version<T>( self, v: Option<T>, ) -> Self
where T: Into<Timestamp>,

Sets or clears the value of current_route_segment_traffic_version.

§Example
use wkt::Timestamp;
let x = Trip::new().set_or_clear_current_route_segment_traffic_version(Some(Timestamp::default()/* use setters */));
let x = Trip::new().set_or_clear_current_route_segment_traffic_version(None::<Timestamp>);
Source

pub fn set_current_route_segment_end_point<T>(self, v: T) -> Self
where T: Into<TripWaypoint>,

Sets the value of current_route_segment_end_point.

§Example
use google_maps_fleetengine_v1::model::TripWaypoint;
let x = Trip::new().set_current_route_segment_end_point(TripWaypoint::default()/* use setters */);
Source

pub fn set_or_clear_current_route_segment_end_point<T>( self, v: Option<T>, ) -> Self
where T: Into<TripWaypoint>,

Sets or clears the value of current_route_segment_end_point.

§Example
use google_maps_fleetengine_v1::model::TripWaypoint;
let x = Trip::new().set_or_clear_current_route_segment_end_point(Some(TripWaypoint::default()/* use setters */));
let x = Trip::new().set_or_clear_current_route_segment_end_point(None::<TripWaypoint>);
Source

pub fn set_remaining_distance_meters<T>(self, v: T) -> Self
where T: Into<Int32Value>,

Sets the value of remaining_distance_meters.

§Example
use wkt::Int32Value;
let x = Trip::new().set_remaining_distance_meters(Int32Value::default()/* use setters */);
Source

pub fn set_or_clear_remaining_distance_meters<T>(self, v: Option<T>) -> Self
where T: Into<Int32Value>,

Sets or clears the value of remaining_distance_meters.

§Example
use wkt::Int32Value;
let x = Trip::new().set_or_clear_remaining_distance_meters(Some(Int32Value::default()/* use setters */));
let x = Trip::new().set_or_clear_remaining_distance_meters(None::<Int32Value>);
Source

pub fn set_eta_to_first_waypoint<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of eta_to_first_waypoint.

§Example
use wkt::Timestamp;
let x = Trip::new().set_eta_to_first_waypoint(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_eta_to_first_waypoint<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of eta_to_first_waypoint.

§Example
use wkt::Timestamp;
let x = Trip::new().set_or_clear_eta_to_first_waypoint(Some(Timestamp::default()/* use setters */));
let x = Trip::new().set_or_clear_eta_to_first_waypoint(None::<Timestamp>);
Source

pub fn set_remaining_time_to_first_waypoint<T>(self, v: T) -> Self
where T: Into<Duration>,

Sets the value of remaining_time_to_first_waypoint.

§Example
use wkt::Duration;
let x = Trip::new().set_remaining_time_to_first_waypoint(Duration::default()/* use setters */);
Source

pub fn set_or_clear_remaining_time_to_first_waypoint<T>( self, v: Option<T>, ) -> Self
where T: Into<Duration>,

Sets or clears the value of remaining_time_to_first_waypoint.

§Example
use wkt::Duration;
let x = Trip::new().set_or_clear_remaining_time_to_first_waypoint(Some(Duration::default()/* use setters */));
let x = Trip::new().set_or_clear_remaining_time_to_first_waypoint(None::<Duration>);
Source

pub fn set_remaining_waypoints_version<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of remaining_waypoints_version.

§Example
use wkt::Timestamp;
let x = Trip::new().set_remaining_waypoints_version(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_remaining_waypoints_version<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of remaining_waypoints_version.

§Example
use wkt::Timestamp;
let x = Trip::new().set_or_clear_remaining_waypoints_version(Some(Timestamp::default()/* use setters */));
let x = Trip::new().set_or_clear_remaining_waypoints_version(None::<Timestamp>);
Source

pub fn set_remaining_waypoints_route_version<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of remaining_waypoints_route_version.

§Example
use wkt::Timestamp;
let x = Trip::new().set_remaining_waypoints_route_version(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_remaining_waypoints_route_version<T>( self, v: Option<T>, ) -> Self
where T: Into<Timestamp>,

Sets or clears the value of remaining_waypoints_route_version.

§Example
use wkt::Timestamp;
let x = Trip::new().set_or_clear_remaining_waypoints_route_version(Some(Timestamp::default()/* use setters */));
let x = Trip::new().set_or_clear_remaining_waypoints_route_version(None::<Timestamp>);
Source

pub fn set_number_of_passengers<T: Into<i32>>(self, v: T) -> Self

Sets the value of number_of_passengers.

§Example
let x = Trip::new().set_number_of_passengers(42);
Source

pub fn set_last_location<T>(self, v: T) -> Self

Sets the value of last_location.

§Example
use google_maps_fleetengine_v1::model::VehicleLocation;
let x = Trip::new().set_last_location(VehicleLocation::default()/* use setters */);
Source

pub fn set_or_clear_last_location<T>(self, v: Option<T>) -> Self

Sets or clears the value of last_location.

§Example
use google_maps_fleetengine_v1::model::VehicleLocation;
let x = Trip::new().set_or_clear_last_location(Some(VehicleLocation::default()/* use setters */));
let x = Trip::new().set_or_clear_last_location(None::<VehicleLocation>);
Source

pub fn set_last_location_snappable<T: Into<bool>>(self, v: T) -> Self

Sets the value of last_location_snappable.

§Example
let x = Trip::new().set_last_location_snappable(true);
Source

pub fn set_view<T: Into<TripView>>(self, v: T) -> Self

Sets the value of view.

§Example
use google_maps_fleetengine_v1::model::TripView;
let x0 = Trip::new().set_view(TripView::Sdk);
let x1 = Trip::new().set_view(TripView::JourneySharingV1S);
Source

pub fn set_attributes<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<TripAttribute>,

Sets the value of attributes.

§Example
use google_maps_fleetengine_v1::model::TripAttribute;
let x = Trip::new()
    .set_attributes([
        TripAttribute::default()/* use setters */,
        TripAttribute::default()/* use (different) setters */,
    ]);

Trait Implementations§

Source§

impl Clone for Trip

Source§

fn clone(&self) -> Trip

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Trip

Source§

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

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

impl Default for Trip

Source§

fn default() -> Trip

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

impl Message for Trip

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Trip

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Trip

Auto Trait Implementations§

§

impl Freeze for Trip

§

impl RefUnwindSafe for Trip

§

impl Send for Trip

§

impl Sync for Trip

§

impl Unpin for Trip

§

impl UnsafeUnpin for Trip

§

impl UnwindSafe for Trip

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
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<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

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

Source§

type Error = !

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